note 63877 added to function.print-r
| From: | php at mac-specialist dot com | Date: | Mon, 03 Apr 2006 02:23:55 +0000 |
| Subject: | note 63877 added to function.print-r | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-107195@lists.php.net to get a copy of this message | ||
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 ; }
}
----
Server IP: 64.71.164.2
Probable Submitter: 67.187.99.194
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.print-r.php
Edit -- http://master.php.net/note/edit/63877
Del: integrated -- http://master.php.net/note/delete/63877/integrated
Del: useless -- http://master.php.net/note/delete/63877/useless
Del: bad code -- http://master.php.net/note/delete/63877/bad+code
Del: spam -- http://master.php.net/note/delete/63877/spam
Del: non-english -- http://master.php.net/note/delete/63877/non-english
Del: in docs -- http://master.php.net/note/delete/63877/in+docs
Del: other reasons-- http://master.php.net/note/delete/63877
Reject -- http://master.php.net/note/reject/63877
Search -- http://master.php.net/manage/user-notes.php