RsD0p9BK
4/10/2015 - 12:35 PM

array_list.php

// explode() into $key=>$value pair

list($k, $v) = explode(' ', $strVal);
$result[$k] = $v;

// -- -- -- -- -- -- -- -- -- -- -- -- //

$strVar = "key value";
list($key, $val) = explode(' ', $strVar);

$arr= array($key => $val);

// http://stackoverflow.com/questions/15966693/explode-into-key-value-pair