note 88738 deleted from function.print-r by danbrown
| From: | danbrown@php.net | Date: | Thu, 05 Feb 2009 17:02:31 +0000 |
| Subject: | note 88738 deleted from function.print-r by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150263@lists.php.net to get a copy of this message | ||
Note Submitter: mzilla at gmail doterdiedoterdiedot com
----
A simple function to emulate the output print_r makes when passing an Array as argument.
Code:
<?php
$line = "Array(\n";
foreach($array as $k => $v){
$line .= "\t [".$k.'] => '.$v."\n";
}
$line .= "\n)\n";
?>
Output:
Array(
[id] => 144
[title] => Test
)