samedi 7 février 2015

Variable string use in Array php


Vote count:

0




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


asked 26 secs ago







Variable string use in Array php

Aucun commentaire:

Enregistrer un commentaire