开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜