Jump to content

Archived

This topic is now archived and is closed to further replies.

arianhojat

Pretty printing php arrays with print_r

Recommended Posts

i output an array to html with print_r($array) func. Anyway to get it nicely formatted?

thanks

if not anyone got a recursive function i can try?

Share this post


Link to post
Share on other sites
This is an improvement over just print_r()

[code]
echo '<pre>', print_r($array, true), '</pre>';
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.