I’m just playing with PHP and trying to make a string encoder (just for fun). The idea is that the encoded string looks like
[code]
qwlkjhdf lkjsdhflkjhjpgj%%11|2|21|22|11|9|5
I have no problem encoding it, and how it is encoded has no relevance. The problem I have is with decoding. I have to have a variable containing what is before “%%” and an array containing each element from after the “%%”, splitted by “|”. I use this code:
[code]
$pattern = split(“%%”, $encodedString);
$data = $pattern[1];
$data = split(“|”, $data); //Line 25
$pattern = $pattern[0];
$pattern represents what is before “%%”. $data should be the array I’m talking about, but on line 25 I get this error:
[code]
Warning: split(): REG_EMPTY in C:apache2triadhtdocsworknewencode.php on line 25
Anyone has any ideas why this error occurs??