I have an array like them i would like to access this sub category array like this
foreach($data as $parent_category){
$ndata=$parent_category['subCategory'];
foreach ($ndata as $subCategory){
}
}
Where $data is my main array print_r($data) give this output
When i access this array i got an error Undefined index: subCategory
Help me please ...
Array ( [1] => Array ( [name] => Indian Culture [subCategory] => Array ( [0] => Array ( [name] => Indain Culture-1 [articleId] => 10 ) [1] => Array ( [name] => culture -1 [articleId] => 22 ) ) ) [5] => Array ( [name] => ABC CULTURE )
)