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>";

 

Leave a Reply

Close Menu
%d bloggers like this: