Why do I get 2 different results in this very simple script:
$str = "114004©301000©301000©301000©";
echo $str."<br/ >"; //Prints 114004©301000©301000©301000©
$test1 = (explode("©",$str));
print_r($test1); //Prints Array ( [0] => 114004 [1] => 301000 [2] => 301000 [3] => 301000 [4] => )
echo "<br /><br />";
$blah = $data['final_alle_produktid']; // Contains a string called 114004©301000©301000©301000©
$test1 = (explode("©",$blah));
print_r($test1); //Prints Array ( [0] => 114004©301000©301000©301000© )
I don't understand why the second explode won't split up the string just because i originated from a mysql query.
Edit: I can't even use str_replace
on this example:
$blah = str_replace("©"," ",$data['final_alle_produktid']);
echo $blah."<br/ >"; //Still prints 114004©301000©301000©301000©
Makes no sense. utf8_decode changes nothing. Not even if I save it in a variable first e.g.:
$test = $data['final_alle_produktid'];
$blah = str_replace("©"," ",$test);
echo $blah."<br/ >"; //Still prints 114004©301000©301000©301000©
Edit2:
print_r($blah); //Prints 114004©301000©301000©301000©
Edit 3
No solution. Had nothing to do with the limit. If I exchange the © with a B then everything works.
Solution:
I had to included correct encoding (I simply added the standard html headers and encoding).