I'm a beginner and really need your help. I have the following data:
[1] => Array
(
[category] => Professional sports team
[name] => MMA Academy Lebanon
[created_time] => 2014-02-27T08:26:50+0000
[id] => 145482752217243
)
[2] => Array
(
[category] => Company
[name] => AUB Rally Paper'11 - Team #2 - MEAB
[created_time] => 2011-05-08T17:25:10+0000
[id] => 184753811576654
)
[3] => Array
(
[category] => Food/beverages
[name] => SuperFresh Lebanon
[created_time] => 2011-05-03T12:25:44+0000
[id] => 118829648191256
)
How can I extract and display only the name from each array using php? (note: I have many arrays so I need a code that will do the job regardless of how many arrays I have) I am a beginner so let your answer be as comprehensive and simple as possible
Thanks a lot!!
array_map( function($value) { return $value['name']; }, $myData);or a simple loop