-3

I have an array like below

stdClass Object
(
    [1] => stdClass Object
        (
            [title] => 
            [description] =>
        )
)

how can i get the description field in php

Piyush Gupta
  • 2,181
  • 3
  • 13
  • 28

1 Answers1

0

like this:

foreach($parentObject as $childObject){
   echo $childObject->description;
   //or $childObject['description'] if childObject is array
}
Aref Anafgeh
  • 512
  • 1
  • 6
  • 20