how to use print_r in php with pre code example Example: echo pre print_r echo '<pre>',print_r($arr,1),'</pre>';