How do I write this foreach loop as any other kind of loop? - by user201349 foreach ($a as $b) { do function } Read the article