PHP: A better way of getting the first value in an array if it's present
<p>Here's my code:</p>

<pre><code>$quizId = '';
foreach ($module['QuizListing'] as $quizListing)    {
    if ($quizListing['id']) {
        $quizId = $quizListing['id'];
        break;
    }
}
</code></pre>

<p>Is there a better way of doing this?</p>
