I want to create an array from this string, stored in database:
$string = '"2148" => "50","2050" => "2","2403" => "1"';
$id_values = explode('=> "', $string);
foreach($id_values as $id => $value)
{
$value_to_print .= '<img src="images/item_values/'.$id.'.gif"> - '.$value.'';
}
echo $value_to_print;
Manually defining the array works as expected:
$id_values = array("2148" => "50","2050" => "2","2403" => "1");

yes exactly.... – user3050478 3 mins agoYou just have to up 2x * around the "why" :)image_idor whatever name