joecooper Posted October 12, 2008 Share Posted October 12, 2008 Hi, How can i do an IF statement for increments of 10. eg: if($i==10,20,30,40,50,60...){ } Link to comment https://forums.phpfreaks.com/topic/128081-help-with-if-statement/ Share on other sites More sharing options...
JasonLewis Posted October 12, 2008 Share Posted October 12, 2008 Like this? <?php $i = 50; if($i % 10 == 0){ echo "Increment of 10!"; }else{ echo "Not an increment."; } ?> Link to comment https://forums.phpfreaks.com/topic/128081-help-with-if-statement/#findComment-663270 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.