simple problem i think.. modulus not working for me
Posted: Wed Mar 16, 2005 10:39 pm
before i start pulling out my hair can someone help me with this simple piece of code you've probably all have seen in any php beginner book.
for some reason i am not getting the correct result:
<?php
$x=6;
$y=4;
$z=$x%$y;
print $z;
?>
correct answer -> 5
my answer -> 2
why? maybe someone can help me out here.
thanks.
for some reason i am not getting the correct result:
<?php
$x=6;
$y=4;
$z=$x%$y;
print $z;
?>
correct answer -> 5
my answer -> 2
why? maybe someone can help me out here.
thanks.