How to print or output the contents of a PHP Array.




(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)





How to print or output the contents of a PHP Array.
Log in to answer.
Copyright © dBuggr LLC - All Rights Reserved.
smallwei 2:01 pm on October 27, 2009
This is a common task for every php developer. You can simply use the following function:
print_r($myarray);This will give you a listing of all the items in the array. (Including multi-dimensional arrays).
For example:
The results would be something like: