1

    if ($content = getData('LED'))
    {
        return $content;
    }

Need to go on line through the array until the content is not empty! How? Sry for bad english

3 Answers 3

9
$airports = array('LED','DME','SVO','VKO','AER','KRR','IKT','KGP','KHV');
foreach($airports as $airport) {
  if($content = getData($airport)) {
    return $content;
  }
}
Sign up to request clarification or add additional context in comments.

Comments

1

Do you mean something like array_walk, in_array, foreach or array_reduce?

Comments

0

foreach

or while, if you prefer

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.