Search code examples
phpformatvar-dump

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?


Solution

  • 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)