PHP while array
if ($content = getData('LED'))
{
return $content;
}
Need to go on line through the array until the content is not empty! How? Sry for开发者_如何学Go bad english
$airports = array('LED','DME','SVO','VKO','AER','KRR','IKT','KGP','KHV');
foreach($airports as $airport) {
if($content = getData($airport)) {
return $content;
}
}
Do you mean something like array_walk, in_array, foreach or array_reduce?
foreach
or while, if you prefer
精彩评论