note 32550 deleted from function.implode by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 13:13:50 +0000 |
| Subject: | note 32550 deleted from function.implode by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189714@lists.php.net to get a copy of this message | ||
Note Submitter: james at globalmegacorp dot org
----
As a followup to the implode_with_keys function posted by 'static', here's a
corresponding explode_with_keys function I wrote:
function explode_with_keys($seperator, $string)
{
$output=array();
$array=explode($seperator, $string);
foreach ($array as $value) {
$row=explode("=",$value);
$output[$row[0]]=$row[1];
}
return $output;
}