bugcoder Posted October 18, 2012 Share Posted October 18, 2012 hi, i want the foreach loop to exit right away when i get warning message. How can I know that i have got warning while looping as foreach continues looping even if warning comes. Link to comment https://forums.phpfreaks.com/topic/269634-warning-while-foreach-loop/ Share on other sites More sharing options...
Pikachu2000 Posted October 18, 2012 Share Posted October 18, 2012 You just need to change line 42, obviously. Link to comment https://forums.phpfreaks.com/topic/269634-warning-while-foreach-loop/#findComment-1386057 Share on other sites More sharing options...
Jessica Posted October 18, 2012 Share Posted October 18, 2012 try using break; Link to comment https://forums.phpfreaks.com/topic/269634-warning-while-foreach-loop/#findComment-1386058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.