note 18920 added to function.print-r

From: Date: Sun, 10 Feb 2002 00:39:40 +0000
Subject: note 18920 added to function.print-r
Groups: php.notes 
Request: Send a blank email to php-notes+get-26427@lists.php.net to get a copy of this message
Here's how to use Output buffering with print_r(), and then format it for JScript: // get the variables ob_start(); print_r($HTTP_POST_VARS); $v = ob_get_contents(); ob_end_clean(); // Format them nicely for JS: $v = str_replace( "\n", "\\n", $v ); -- http://www.php.net/manual/en/function.print-r.php http://master.php.net/manage/user-notes.php?action=edit+18920 http://master.php.net/manage/user-notes.php?action=delete+18920 http://master.php.net/manage/user-notes.php?action=reject+18920

« previous php.notes (#26427) next »