note 68842 added to function.implode
| From: | worldwidewebdotC-Klingdotde at osu1 dot php dot net | Date: | Sat, 12 Aug 2006 19:14:47 +0000 |
| Subject: | note 68842 added to function.implode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115845@lists.php.net to get a copy of this message | ||
A Script for imploding a multideimensional Array. You give an array of separators in the first
argument, and a (multidimensional) array in the second. The script will return the imploded array.
function multimplode($spacer,$array)
{
if (!is_array($array))
{
return($array);
}
if (empty($spacer))
{
return(multimplode(array(""),$array));
}
else
{
$trenn=array_shift($spacer);
while (list($key,$val) = each($array))
{
if (is_array($val))
{
$array[$key]=multimplode($spacer,$val);
}
}
$array=implode($trenn,$array);
return($array);
}
}
----
Server IP: 217.160.72.57
Probable Submitter: 217.87.251.118
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.implode.php
Edit -- https://master.php.net/note/edit/68842
Del: integrated -- https://master.php.net/note/delete/68842/integrated
Del: useless -- https://master.php.net/note/delete/68842/useless
Del: bad code -- https://master.php.net/note/delete/68842/bad+code
Del: spam -- https://master.php.net/note/delete/68842/spam
Del: non-english -- https://master.php.net/note/delete/68842/non-english
Del: in docs -- https://master.php.net/note/delete/68842/in+docs
Del: other reasons-- https://master.php.net/note/delete/68842
Reject -- https://master.php.net/note/reject/68842
Search -- https://master.php.net/manage/user-notes.php