Qbasicnews.com

Full Version: Arrays in PHP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've just been learning a little about arrays in PHP and am wandering what method of printing an array with different indices is better, using a foreach loop or using each with a while loop. Any ideas?
I would use a for loop for numerical indices, and a for-each for associative arrays.