note 63877 deleted from function.print-r by bjori

From: Date: Mon, 03 Apr 2006 04:48:25 +0000
Subject: note 63877 deleted from function.print-r by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-107202@lists.php.net to get a copy of this message
Note Submitter: php at mac-specialist dot com Reason: useless ---- function bh_print_r(& $aArray, $arrayName = "Array Results", $printNow = true) { /* called with 1, 2, or 3 parameters as follows : ( 1 ) bh_print_r( $aTableNames) ; ( 2 ) bh_print_r( $aTableNames, "(95) \$aTableNames[ ] - Table names array..." ) ; ( 3 ) $str = bh_print_r( $aTableNames, "(95) \$aTableNames[ ] - Table names array...", false ) ; echo $str ; Bill Hernandez - Updated - Monday, April 03, 2006 ( 2:09 AM ) */ $myArrayName = ($arrayName=="") ? "Array Results" : $arrayName ; $str = '<pre>' ; $str .= $myArrayName ; $str .= substr(print_r($aArray, true), 5) ; // remove the "Array" that print_r inserts in the result $str .= '</pre>' ; if($printNow) { print $str ; } else { return $str ; } }

« previous php.notes (#107202) next »