- Forums
- PHP
- Printing the Values Of An Array Elements With Php function
This Page Contains information about Printing the Values Of An Array Elements With Php function By wallpaperama in category PHP with 1 Replies. [1239], Last Updated: Sat May 18, 2024
wallpaperama
Fri Jan 09, 2009
1 Comments
628 Visits
to print the values of an array in php is easy, when i first started with PHP i thot i could do it with echo but it doesnt work.
lets say i have a string thats an array:
$myarray= array();
echo $myarray;
the output of that would just be: array
ahahahaha. i remember it was so funny, i wish i could see my face, i couldn't believe it. so if you want to display the values of an array this is how you do it.
<?php
echo '<pre>';
print_r($myarray);
echo '</pre>';
?>
hope that helps
try it, it works like a charm
https://www.wallpaperama.com/forums/printing-values-of-an-array-elements-with-php-t6970.html