PHP test – #1
What happens with the following code:
<?php
for($i=a;$i<=z;$i++) echo("$i\n");
?>
And what’s the difference with?
<?php
for($i=a;$i<z;$i++) echo("$i\n");
?>
Why is the result different? and How?
…
Worst:
<?php
$i=a;
while(strcmp($i,z)<=0){
echo($i."\n");
$i++;
}
?>
Gives exactly the same result as the second exemple.
…
hints:
http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion
http://www.php.net/manual/en/language.operators.comparison.php
http://www.php.net/manual/en/language.types.string.php


