Hello everybody
$a=""; $b=explode(",",$a); for (i=0; count($b); i++) { echo $i; }
normally nothing must happen. But he echos me a 0, sometimes a 1. Why??
Really? Once I've fixed the syntax errors I get 012345678910111213141516171819202122232425.... ad infinitum, for an obvious reason: count($b) is equal to 1, and always equal to 1.
$a=""; $b=explode(",",$a); for (i=0; i<count($b); i++) { echo $i; }
Well, since count($b) is equal to 1, and assuming you know that the i's in that same line should be $i's - I predict that if I ran it I'd get 0.
Yep. Works as I expected. Are you saying that code sometimes echoes 1?