blmg2009 Posted June 18, 2015 Share Posted June 18, 2015 I'm wanting to create a foreach loop to loop through a number of mysql tables. With each foreach loop I wish to have a a number of FOR loops counting to 64, 32, 16 and 8 to insert that number times into that table. Is this possible? Quote Link to comment https://forums.phpfreaks.com/topic/296906-can-i-use-a-for-loop-inside-a-foreach-loop/ Share on other sites More sharing options...
Barand Posted June 18, 2015 Share Posted June 18, 2015 Yes. Quote Link to comment https://forums.phpfreaks.com/topic/296906-can-i-use-a-for-loop-inside-a-foreach-loop/#findComment-1514285 Share on other sites More sharing options...
isabella_martin Posted June 19, 2015 Share Posted June 19, 2015 yes of course you can use for loop inside foreach loop. Quote Link to comment https://forums.phpfreaks.com/topic/296906-can-i-use-a-for-loop-inside-a-foreach-loop/#findComment-1514313 Share on other sites More sharing options...
Muddy_Funster Posted June 19, 2015 Share Posted June 19, 2015 you would be better off using the loops to create a single query string that you can send to the db. Quote Link to comment https://forums.phpfreaks.com/topic/296906-can-i-use-a-for-loop-inside-a-foreach-loop/#findComment-1514345 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.