PHP而阵列

Isi*_*sis 1 php while-loop

    if ($content = getData('LED'))
    {
        return $content;
    }
Run Code Online (Sandbox Code Playgroud)

需要在数组上线直到内容不为空!怎么样?惹坏英语

Ent*_*ndu 9

$airports = array('LED','DME','SVO','VKO','AER','KRR','IKT','KGP','KHV');
foreach($airports as $airport) {
  if($content = getData($airport)) {
    return $content;
  }
}
Run Code Online (Sandbox Code Playgroud)