I have following code in my contoller:
public function actionForm($id)
{
$jsonfile=ChForms::model()->findByPk($id);
$decodedJson=json_decode($jsonfile->json, true);
var_dump($decodedJson);
return $decodedJson;
}
Here json ( in $jsonfile->json) is name of the field in ChForms. When I wrote `var_dump($decodedJson);, it showed the data below:
array(38) { ["name"]=> string(10) "membership" ["view"]=> string(14) "pdf/membership" ["phone"]=> string(5) "22222"
I am going to display it in the following way:
name: membership
view: pdf/membership
phone: 22222
How can I do it?