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

Recommended Answers

All 3 Replies

$json = '{"Data":{"Date":"08:09 20-01-2014","SchoolID":"923214157777","Type":"1","Nic":["3520135201001","3520135201002","3520135201003"]}}';
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 ?

Be a part of the DaniWeb community

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