{"Data":{"Date":"08:09 20-01-2014","SchoolID":"923214157777","Type":"1","Nic":{"3520135201001","3520135201002","3520135201003"}}}

$json = '{"Data":{"Date":"08:09 20-01-2014","SchoolID":"923214157777","Type":"1","Nic":["3520135201001","3520135201002","3520135201003"]}}';
$main_array=json_decode($json);
foreach($main_array->Data as $obj ) {
echo $obj->date;

i am using this approach but its keep on giving me a warning
how to get the nic array in it ?

It's Date, not date

commented: well that's very nice of you but i just typed here wrong :) +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.