note 88016 deleted from function.implode by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 13:21:35 +0000 |
| Subject: | note 88016 deleted from function.implode by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189762@lists.php.net to get a copy of this message | ||
Note Submitter: crashinside
----
I've implemented the function implode (it's easy):
<?php
function mt_implode($char,$array)
{
$lem = array_keys($array);
$char = htmlentities($char);
for($i=0;$i<sizeof($lem);$i++) {
$str .= ($i == sizeof($lem)-1) ? $array[$lem[$i]] : $array[$lem[$i]].$char;
}
return $str;
}
?>
Have fun