When I use print_r() to display an array, it does not put in the proper line breaks and indents like it should. Instead it is all on one line like:
Array( [0] => 'hi' [1] => 'bye' );
How can I make it so it's like:
Array
(
[0] => 'hi'
[1] => 'bye'
)
print_r() not working properly?
Moderator: General Moderators
-
HiddenS3crets
- Forum Contributor
- Posts: 119
- Joined: Fri Apr 22, 2005 12:23 pm
- Location: USA
Code: Select all
echo '<pre>';
print_r($array);
echo '</pre>';Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.