How to display array in human readable format in php

To print the display in ‘human readable’ format, use the html preformatting tag before print_r:

echo "<pre>";
print_r($myarray);
echo "</pre>";

 

You may also like...

Leave a Reply