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;'; } 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; } Link to comment https://forums.phpfreaks.com/topic/245718-php-return-continue/#findComment-1262069 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.