note 37929 deleted from function.var-export by derick

From: Date: Wed, 03 Mar 2004 19:21:11 +0000
Subject: note 37929 deleted from function.var-export by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-66206@lists.php.net to get a copy of this message
Note Submitter: Mr Johnnie Walker ---- // Here's a recursive version for PHP > 4.2 function jw_var_export($inputArray,$indent="") { $output .= "array (\n"; foreach($inputArray as $thisKey => $thisValue) { $output .= "$indent$thisKey => "; if (! is_array($thisValue)) { $output .= "'$thisValue'"; } else { $output .= jw_var_export($thisValue,"$indent "); } $output .= ",\n"; } $output = substr($output,0,-2); $output .= "$indent\n$indent)"; return $output; } // usage: echo jw_var_export($anArray);

« previous php.notes (#66206) next »