Created
March 9, 2015 15:27
-
-
Save matesnippets/2c6ad2414350cdc2b382 to your computer and use it in GitHub Desktop.
PHP, print_r() helper function. Prints arrays out in a nice, formatted, human readable way.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Prints out array in human readable form, just a helper function | |
* @param array $arr The wanted array to be printed | |
* @return array The array in human readable form | |
*/ | |
function printr_func($arr) | |
{ | |
echo "<pre class='printr'><code>"; | |
print_r($arr); | |
echo "</code></pre>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment