【发布时间】:2014-12-07 20:07:48
【问题描述】:
SimpleXMLElement Object
(
[@attributes] => Array
(
[domain] => http://www.eatingwell.com/category/publication/magazine /september/october_2009
)
[0] => September/October 2009
[1] => American
[2] => Easy
[3] => Diabetes appropriate
[4] => Healthy weight
[5] => High calcium
[6] => Low calorie
[7] => Low cholesterol
[8] => Bone Health
[9] => Super Bowl
[10] => Recipes & Menus - Fresh
[11] => Recipes & Menus - Vegetarian
[12] => Cheese
[13] => Dairy
[14] => Greens
[15] => Vegetables
[16] => Wheat
[17] => Whole Grains
[18] => Vegetarian, other
[19] => Appetizers
[20] => Dinner

[21] => Bake
[22] => Fall
[23] => Spring
[24] => Summer
[25] => Winter
[26] => Budget
[27] => Entertaining, casual
[28] => Everyday favorites
[29] => Quick (total 30 min. or less)
[30] => Vegetarian
[31] => Appetizer
[32] => Main dish, vegetarian
[33] => Pizza
)
我想从 rss 提要中检索类别,但 $bullet =$item->category;pr($bullet); 它显示上述结果。我只想要数组值 [0] 到 [33]。如何从上述结果中删除@attributes?
【问题讨论】:
标签: php xml rss simplexml feed