I have an array in this format:
$options = Array ( [0] => "Ash Gold"=>"215,205,137" [1] => "Autumn Orange"=>"158,68,24");
what i need is:
$options = Array ( "Ash Gold"=>"215,205,137" , "Autumn Orange"=>"158,68,24");
Thanks in advance
hmmm...the original format is one I have never seen. I dont think the double arrow operation is legal. Are you trying to say that you have a format of: $options[0][0]="Ash Gold"; $options[0][1]="215,205,137"; ?
well... all the values come from a database... the field they come from is an ENUM type... each "value" looks like:
"COLOR"=>"RGB VALUE"
when i parse out the field and explode the string it creates the format I have shown above
whether or not its valid I have no idea... but some how i need to rework that array into the format i have shown
$options[0] = "Ash Gold"=>"215,205,137"; $options[1] = "Autumn Orange"=>"158,68,24";