note 87571 deleted from function.implode by danbrown

From: Date: Thu, 11 Dec 2008 03:17:30 +0000
Subject: note 87571 deleted from function.implode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148014@lists.php.net to get a copy of this message
Note Submitter: mtcmorris at gmail dot com ---- This recursive implode function may have bugs in it but it seems to work better than the ones listed for me.... function implode_md($glue, $array) { if(is_array($array)) { $elements = ""; foreach($array as $element) { if(is_array($element)) { $elements .= implode_md($glue,$element); } else { $elements .= $element. $glue; } } return $elements; } else { return $array; } }

« previous php.notes (#148014) next »