I found print_r but it prints the contents of my array in a non-readable format.
All the documents I've googled talk about print_r
How can I display something like,
the array:
$file_extensions = array("'.jpg','.gif','.png'");
the output:
Extensions allowed: .jpg, .gif, .png
Echo the values of an array?
Moderator: General Moderators
Re: Echo the values of an array?
implode() ?
There are 10 types of people in this world, those who understand binary and those who don't
Re: Echo the values of an array?
Thanks, it worked.
Re: Echo the values of an array?
You can echo "<pre>" tags around your print_r or view the source of the document (or output it as plain text) to see it formatted correctly. It uses whitespace to format the array, which html basically ignores. Of course print_r is mostly for debugging things.