I want to use variable string in Array like I saved array value any file or document or variable and I want to use it in array but I am failed to do so.
$var = "'title' => 'This is my title','name' => 'My name is John'";
$ar = array($var);
echo $ar['title'].'<br>'.$ar['name'];
Error I am getting
Notice: Undefined index: title
Notice: Undefined index: name