07-31-2005, 12:33 AM
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?
Arrays in PHP
|
07-31-2005, 12:33 AM
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?
07-31-2005, 12:55 AM
I would use a for loop for numerical indices, and a for-each for associative arrays.
|
« Next Oldest | Next Newest »
|