How to loop through a php array with attributes

ghd Style

New Member
I'm trying to figure out how I can loop through an array that is like this:Array ( [0] => Array ( [@attributes] => Array ( [goal_id] => 12113 ) [name] => read a book [num_registered_people] => 417 [link] => Array ( [@attributes] => Array ( [href] => hings.com/things/view/12113/read-a-book [rel] => alternate [type] => text/html ) ) [progress_link] => Array ( [@attributes] => Array ( [href] => ht3things.com/people/progress/userck/16963430 [rel] => alternate [type] => text/html ) ) [num_cheers] => 0 [num_entries] => 0 [state] => want_to [has_goal] => true [goal_completed] => false [id] => tag:43things.com:userck:goal:12113 ) [1] => Array ( [@attributes] => Array ( [goal_id] => 335348 ) [name] => grow a tree [num_registered_people] => 27 [link] => Array ( [@attributes] => Array ( [href] => hhings.com/things/view/335348/grow-a-tree [rel] => alternate [type] => text/html ) ) [progress_link] => Array ( [@attributes] => Array ( [href] => http:/rogress/userck/16963431 [rel] => alternate [type] => text/html ) ) [num_cheers] => 0 [num_entries] => 0 [state] => want_to [has_goal] => true [goal_completed] => false [id] => tag:43things.com:userck:goal:335348 ) [2] => Array ( [@attributes] => Array ( [goal_id] => 850698 ) [name] => eat a lemon [num_registered_people] => 3 [link] => Array ( [@attributes] => Array ( [href] => http:gs.com/things/view/850698/eat-a-lemon [rel] => alternate [type] => text/html ) ) [progress_link] => Array ( [@attributes] => Array ( [href] => htt3things.com/people/progress/userck/16963432 [rel] => alternate [type] => text/html ) ) [num_cheers] => 0 [num_entries] => 0 [state] => want_to [has_goal] => true [goal_completed] => false [id] => tag:43things.com:userck:goal:850698 ) [3] => Array ( [@attributes] => Array ( [goal_id] => 5005624 ) [name] => mow a golf course [num_registered_people] => 1 [link] => Array ( [@attributes] => Array ( [href] => htcom/things/view/5005624/mow-a-golf-course [rel] => alternate [type] => text/html ) ) [progress_link] => Array ( [@attributes] => Array ( [href] => htt.com/people/progress/userck/16963433 [rel] => alternate [type] => text/html ) ) [num_cheers] => 0 [num_entries] => 0 [state] => want_to [has_goal] => true [goal_completed] => false [id] => tag:43things.com:userck:goal:5005624 ) [4] => Array ( [@attributes] => Array ( [goal_id] => 5006481 ) [name] => finish assignment 6 [num_registered_people] => 1 [link] => Array ( [@attributes] => Array ( [href] => httpcom/things/view/5006481/finish-assignment-6 [rel] => alternate [type] => text/html ) ) [progress_link] => Array ( [@attributes] => Array ( [href] => http.com/people/progress/userck/16965199 [rel] => alternate [type] => text/html ) ) [num_cheers] => 0 [num_entries] => 0 [state] => want_to [has_goal] => true [goal_completed] => false [id] => tag:43things.com:userck:goal:5006481 ) ) Any ideas on how to get past the @attributes? Thanks.
 
Top