The following is the output of a two-dimensional array with SimpleXMLElement object, how can the inside of the SimpleXMLElement object all removed into a normal two-dimensional array.
Array ([0] = SimpleXMLElement Object ([Favtype] = 2 [freesum] = [freecurrent] = 965 [FavCode1] => ; 1 [FavCode2] = 4 [Favofferinfo] + 201407 enjoy 4G 299 RMB package)
[1] = = SimpleXMLElement Object ([Favtype] = 2 [freesum] [freecurrent] = [FavCode1] = 1 [favco DE2] + 2 [favofferinfo] = 201407 Enjoy 4G 299 RMB package)
[2] = = SimpleXMLElement Object ([Favtype] = 3 [Freesum] = [freecurrent] = [FavCode1] = 4 [favcod E2] + 8 [favofferinfo] + Tianyi-group 0 yuan 30M back flow packet)
[3] = = SimpleXMLElement Object ([Favtype] = 3 [Freesum] = [freecurrent] = [FavCode1] = 4 [favcod E2] + 8 [favofferinfo] + Sky Wing customer service gift 30M in-province traffic pack)
[4] = = SimpleXMLElement Object ([Favtype] = 3 [freesum] = 4096 [freecurrent] = 1857.32 [FavCode1] = 4 [FavCode2] = 8 [Favofferinfo] + 201407 enjoy 4G 299 RMB package))
Reply to discussion (solution)
function Objecttoarray ($o) { if (Is_object ($o)) $o = Get_object_vars ($o); if (Is_array ($o)) foreach ($o as $k = = $v) $o [$k] = Objecttoarray ($v); return $o;}