I am getting an error while accessing elements of an array.
This is my current code:
1st Method::
var_dump($parent_array->info->gcatname);
Error (1st Method)::
<b>Notice</b>:  Trying to get property of non-object
2nd Method::
print_r($parent_array[0]['info']['gcatname']);
Error (2nd Method)::
<b>Fatal error</b>:  Cannot use object of type stdClass as array
Array is as below:
array(1) {
 [0]=>
 array(2) {
  ["is_parent"]=>
    bool(true)
  ["info"]=>
  object(stdClass)#6 (5) {
    ["id"]=>
    string(1) "1"
     ["gcatname"]=>
      string(9) "Swine Flu"
     ["gcatowner"]=>
      string(13) "Vaccine India"
     ["gcatactive"]=>
      string(1) "1"
     ["gcatadded"]=>
      string(19) "2016-05-01 08:30:36"
    }
  }
}
 
     
    