StirCrazy Posted July 5, 2006 Share Posted July 5, 2006 Wonder if anyone can help me. What is the correct syntax for the below?if $counter is divisible exactly by 3 {?> </tr><?php}Cheers guys,S.C> Link to comment https://forums.phpfreaks.com/topic/13769-if-counter-is-divisible-exactly-by-3/ Share on other sites More sharing options...
ober Posted July 5, 2006 Share Posted July 5, 2006 [code]<?phpif(($counter % 3) == 0) echo "</tr>";?>[/code] Link to comment https://forums.phpfreaks.com/topic/13769-if-counter-is-divisible-exactly-by-3/#findComment-53501 Share on other sites More sharing options...
wildteen88 Posted July 5, 2006 Share Posted July 5, 2006 You'll probably want to use something like this:if(($counter % 3) == 0)EDIT: Doh! Me too slow. Link to comment https://forums.phpfreaks.com/topic/13769-if-counter-is-divisible-exactly-by-3/#findComment-53502 Share on other sites More sharing options...
ober Posted July 5, 2006 Share Posted July 5, 2006 You can call me "Quikfingers McGee". ;) Link to comment https://forums.phpfreaks.com/topic/13769-if-counter-is-divisible-exactly-by-3/#findComment-53504 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.