note 68843 added to function.implode

From: Date: Sat, 12 Aug 2006 19:15:05 +0000
Subject: note 68843 added to function.implode
Groups: php.notes 
Request: Send a blank email to php-notes+get-115846@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. <?php 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/68843 Del: integrated -- https://master.php.net/note/delete/68843/integrated Del: useless -- https://master.php.net/note/delete/68843/useless Del: bad code -- https://master.php.net/note/delete/68843/bad+code Del: spam -- https://master.php.net/note/delete/68843/spam Del: non-english -- https://master.php.net/note/delete/68843/non-english Del: in docs -- https://master.php.net/note/delete/68843/in+docs Del: other reasons-- https://master.php.net/note/delete/68843 Reject -- https://master.php.net/note/reject/68843 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115846) next »