note 39344 added to function.ob-get-contents

From: Date: Sun, 25 Jan 2004 15:54:30 +0000
Subject: note 39344 added to function.ob-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-64151@lists.php.net to get a copy of this message
Pretty cool usage of this function: Fetching the output of print_r() for formatted output. <?php function str_print_r($variable) { ob_start(); print_r($variable); $result = ob_get_contents(); ob_end_clean(); return $result; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.ob-get-contents.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39344 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39344&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39344&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64151) next »