note 84520 rejected from function.implode by danbrown
| From: | danbrown@php.net | Date: | Mon, 21 Jul 2008 17:05:11 +0000 |
| Subject: | note 84520 rejected from function.implode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142433@lists.php.net to get a copy of this message | ||
Note Submitter: m dot ford at leedsmet dot ac dot uk
----
Re the previous two posts, the best optimization for "wrapped implode" is surely to get
implode() itself to do the lion's share:
<?php
function implode_wrapped($before, $after, $glue, $array) {
return $before . implode($after.$glue.$before, $array) . $after;
}