On Wednesday, January 22, 2003, at 10:44 PM, Reymond wrote:
Hi everyone,break ends a loop. That's what it does. If you don't want to end a loop, don't call break.
I made a while loop and i'd like to know how to continue looping after I
break it, and . Here is my script :
I found just break looping on my page, can't continue :(
Take a look at your code; it boils down to this:
while (...) {
break;
continue;
}
Generally speaking you would break or continue based on some condition. Your usage as shown below doesn't make any sense to me. Perhaps you need to re-read the documentation on while, break and continue.
http://www.php.net/manual/en/control-structures.while.php
http://www.php.net/manual/en/control-structures.break.php
http://www.php.net/manual/en/control-structures.continue.php
<? while ($row = mysql_fetch_array($myquery)){ ?> <tr> <td class="subtitle" width="50%"> <?=$row['field1']?> </td> <?break;?> <td rowspan="2" valign="top" align="right"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <TD><image src="blabla.jpg"></td> </tr> </table> </td> </tr> <?continue;?> <tr> <td class="body" width="50%"> <p align="justify"><?=$row['field2']?></p> </td> </tr> <? } ?>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php