PHPverse 2025

Voting

: min(six, nine)?
(Example: nine)

The Note You're Voting On

liamtoh6 at hotmail dot com
15 years ago
I add this function to the global scope on just about every project I do, it makes reading the output of print_r() in a browser infinitely easier.

<?php
function print_r2($val){
echo
'<pre>';
print_r($val);
echo
'</pre>';
}
?>

It also makes sense in some cases to add an if statement to only display the output in certain scenarios, such as:

if(debug==true)
if($_SERVER['REMOTE_ADDR'] == '127.0.0.1')

<< Back to user notes page

To Top