note 73870 added to ref.array

From: Date: Tue, 13 Mar 2007 22:57:07 +0000
Subject: note 73870 added to ref.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-124426@lists.php.net to get a copy of this message
Function which converts array to string but not serialize it. function arraytostring($array) { $text.="array("; $count=count($array); foreach ($array as $key=>$value) { $x++; if (is_array($value)) { if(substr($text,-1,1)==')') $text .= ','; $text.='"'.$key.'"'."=>".arraytostring($value); continue; } $text.="\"$key\"=>\"$value\""; if ($count!=$x) $text.=","; } $text.=")"; if(substr($text, -4, 4)=='),),')$text.='))'; return $text; } ---- Server IP: 195.136.184.34 Probable Submitter: 84.10.115.153 ---- Manual Page -- http://www.php.net/manual/en/ref.array.php Edit -- https://master.php.net/note/edit/73870 Del: integrated -- https://master.php.net/note/delete/73870/integrated Del: useless -- https://master.php.net/note/delete/73870/useless Del: bad code -- https://master.php.net/note/delete/73870/bad+code Del: spam -- https://master.php.net/note/delete/73870/spam Del: non-english -- https://master.php.net/note/delete/73870/non-english Del: in docs -- https://master.php.net/note/delete/73870/in+docs Del: other reasons-- https://master.php.net/note/delete/73870 Reject -- https://master.php.net/note/reject/73870 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124426) next »