corillo181 Posted August 19, 2007 Share Posted August 19, 2007 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++; } Quote Link to comment https://forums.phpfreaks.com/topic/65666-even-odd-row/ Share on other sites More sharing options...
corillo181 Posted August 19, 2007 Author Share Posted August 19, 2007 no input needed i figure it out, but if any one had anything they like to let me know your welcome Quote Link to comment https://forums.phpfreaks.com/topic/65666-even-odd-row/#findComment-327943 Share on other sites More sharing options...
Barand Posted August 19, 2007 Share Posted August 19, 2007 As you script echos 'this is a odd road' when $num is odd, I'm still trying to work out what exactly is the problem Quote Link to comment https://forums.phpfreaks.com/topic/65666-even-odd-row/#findComment-328056 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.