How to print Array READABLE
问题 How do i print an Array readable? print_r($array); and var_dump($array); both produce some very ugly clutter of that $array. Ok it is what it says, it prints that array, but i'd like to have some well formated print of that array, how do i do that? 回答1: Actually, it is well-formatted but HTML ignores line breaks and double spaces. You just have to view the page's source code (CTRL+U or right-click > view source code) 回答2: echo '<pre>'; var_dump($array); echo '</pre>'; Or to a better yet