I have an array result that contains multiple arrays. I need to grab all of the “text” fields of the 2nd level of arrays and combine them into a single variable. I’m drawing a blank on how to do this
Array:
Array (
[0] => stdClass Object (
[created_at] => Mon, 20 Aug 2012 18:31:50 +0000
[from_user] => CollectHW
[from_user_id] => 769712384
[from_user_id_str] => 769712384
[from_user_name] => Collect Hot Wheels
[geo] =>
[id] => 237617956643827712
[id_str] => 237617956643827712
[iso_language_code] => en
[metadata] => stdClass Object (
[result_type] => recent )
[profile_image_url] => url
[profile_image_url_https] => url
[source] => web **
[text] => Second Tweet #step2**
[to_user] =>
[to_user_id] => 0
[to_user_id_str] => 0
[to_user_name] => )
[1] => stdClass Object (
[created_at] => Mon, 20 Aug 2012 16:41:53 +0000
[from_user] => CollectHW
[from_user_id] => 769712384
[from_user_id_str] => 769712384
[from_user_name] => Collect Hot Wheels
[geo] =>
[id] => 237590287504011264
[id_str] => 237590287504011264
[iso_language_code] => en
[metadata] => stdClass Object (
[result_type] => recent )
[profile_image_url] => url
[profile_image_url_https] => url
[source] => web **
[text] => First Tweet #step1**
[to_user] =>
[to_user_id] => 0
[to_user_id_str] => 0
[to_user_name] => )
)
Result