Jump to content

even odd row


corillo181

Recommended Posts

hey i am trying to get a even and odd number count going on, but some how the answer is never 1, the even and odd work well, but i want the remainder to be 1 when the number is not even i traid something like this..

 

$num=0
for($i=1;$i<15;$i++){

if($num%2==1){
echo 'this is a odd road';
}

$num++;
}

Link to comment
https://forums.phpfreaks.com/topic/65666-even-odd-row/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.