ameriblog Posted September 12, 2007 Share Posted September 12, 2007 I have an IF statement in my code, what I am trying to accomplish is get IF the variable is 1-16. Right now I have it set to be <= 16, but it is getting results that are 0 that I don't want. if ( $team2_rs->Fields("team_mpirk") <= 16 ) { } Link to comment https://forums.phpfreaks.com/topic/69083-solved-help-with-if-statement/ Share on other sites More sharing options...
Barand Posted September 12, 2007 Share Posted September 12, 2007 if ( ($team2_rs->Fields("team_mpirk") <= 16) && ($team2_rs->Fields("team_mpirk") > 0) ) { } Link to comment https://forums.phpfreaks.com/topic/69083-solved-help-with-if-statement/#findComment-347241 Share on other sites More sharing options...
ameriblog Posted September 12, 2007 Author Share Posted September 12, 2007 Thanks, for some reason I was thinking || instead of &&, bad day Thanks again. Link to comment https://forums.phpfreaks.com/topic/69083-solved-help-with-if-statement/#findComment-347246 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.