Computer Science, asked by hemantkumar900, 1 year ago

What array will u get if u convert an object in to an array?

Answers

Answered by siya34
1
Hi

Can anyone tell me if there is an easy way to convert an object into an array.

I currently have the following object:-

stdClass Object ( [documentFiltering] => [searchComments] => [estimatedTotalResultsCount] => 17900000 [estimateIsExact] => [resultElements] => Array ( [0] => stdClass Object ( [summary] => => http://www.test.com/ [snippet] => Provides extranet privacy to clients making a range of <b>tests</b> and surveys available <br> to their human resources departments. Companies can <b>test</b> prospective and <b>...</b> [title] => <b>Test</b> Central Home [cachedSize] => 39k [relatedInformationPresent] => 1 [hostName] => [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => ) [1] => stdClass Object ( [summary] => => http://www.bandwidthplace.com/speedtest/ [snippet] => Personal <b>Test</b>. <b>Test</b> the speed of your Internet connection Free up to 3 times a <br> month Purchase a subscription for. Up to 1000 <b>tests</b> per month; Personal <b>test</b> <b>...</b> [title] => Bandwidth Speed <b>Test</b> [cachedSize] => 15k [relatedInformationPresent] => 1 [hostName] => [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => ) [2] => stdClass Object ( [summary] => => http://www.innergeek.us/geek.html [snippet] => Geeks everywhere have taken the Original Geek <b>Test</b>, a comprehensive 507-point <br> survey of how geeky you are. Possible ranks include Geekish Tendencies, Geek, <b>...</b> [title] => Geek Out with the Original Geek <b>Test</b> [cachedSize] => 10k [relatedInformationPresent] => 1 [hostName] => [directoryCategory] => stdClass Object ( [fullViewableName] => [specialEncoding] => ) [directoryTitle] => ) ) [searchQuery] => test [startIndex] => 1 [endIndex] => 3 [searchTips] => [directoryCategories] => Array ( ) [searchTime] => 0.026511 )
Similar questions