Any idea how to get this out put with queries?
$obj = array(
"attr" => array(
"id" => 1,
"rel" => "drive"
),
"data" => "My Documents",
"children" => array(
array(
"attr" => array(
"id" => 2,
"rel" => "file"
),
"data" => "file1.doc",
"state" => ""
)
)
);
echo json_encode($obj);
i need to loop only below part of above code.
array(
"attr" => array(
"id" => 2,
"rel" => "file"
),
"data" => "file1.doc",
"state" => ""
)
any help would be great.
Thanks
1 Answer