I have this:
$strVar = \"key value\";
And I want to get it in this:
array(\'key\'=>\'value\')
I tried
You can loop every second string:
$how_many = count($array); for($i = 0; $i <= $how_many; $i = $i + 2){ $key = $array[$i]; $value = $array[$i+1]; // store it here }