iPixel Posted September 5, 2009 Share Posted September 5, 2009 Why isn't this working? I'm trying to get it to look like so... [Zero][1] // supposed to be 0 but BB wont allow it. [2][3] [4][5] [6] <?php for($i=0; $i<=7; $i++) { if($i%2!=0) { $break="<br>"; } ?> <div id='vidclix'><?php echo $i; ?></div><?php echo $break; ?> <?php } ?> Link to comment https://forums.phpfreaks.com/topic/173251-solved-help-with-script/ Share on other sites More sharing options...
cbolson Posted September 5, 2009 Share Posted September 5, 2009 Hi, probably because you are not resetting the $break at the beginning of each loop. Try this: for($i=0; $i<=7; $i++) { $break=""; .... Chris Link to comment https://forums.phpfreaks.com/topic/173251-solved-help-with-script/#findComment-913244 Share on other sites More sharing options...
iPixel Posted September 5, 2009 Author Share Posted September 5, 2009 LOL go figure i'd miss that part . Cbolson 1 iPixel 0 Thanks Bud. Link to comment https://forums.phpfreaks.com/topic/173251-solved-help-with-script/#findComment-913245 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.