I have string and need convert to array.
<?php
$str = '"en"=>"English" , "fr"=>"French" , "de"=>"German"';
$array = array($str);
print_r($array)
?>
I need this result:
Array
(
[en] => English
[fr] => French
[de] => German
)
Is there a function in PHP to do this?
when try below code, I get good result.but when use uppern code, NO! How to convert String variable for input array?
<?php
//$str = '"en"=>"English" , "fr"=>"French" , "de"=>"German"';
$array = array("en"=>"English" , "fr"=>"French" , "de"=>"German");
print_r($array)
?>