MDanz Posted August 25, 2011 Share Posted August 25, 2011 By calling function two will it break the loop?; or do i have to echo what is returned? functione one() { $getids = mysql_query("SELECT * FROM table"); while($row=mysql_fetch_assoc($getids); { $this->two(); } } function two() { return 'break;'; } Quote Link to comment https://forums.phpfreaks.com/topic/245718-php-return-continue/ Share on other sites More sharing options...
requinix Posted August 26, 2011 Share Posted August 26, 2011 Use normal programming principles. Such as return values and boolean values. function one() { while (true) { if (!two()) break; } } function two() { return false; } Quote Link to comment https://forums.phpfreaks.com/topic/245718-php-return-continue/#findComment-1262069 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.