Qbasicnews.com
Qbasicnews.com
>
General
>
General/Misc
>
General Programming
> Arrays in PHP
Full Version:
Arrays in PHP
You're currently viewing a stripped down version of our content.
View the full version
with proper formatting.
ComDriver
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?
Jofers
07-31-2005, 12:55 AM
I would use a for loop for numerical indices, and a for-each for associative arrays.
Qbasicnews.com
>
General
>
General/Misc
>
General Programming
> Arrays in PHP