MCQs > IT & Programming > PHP > What's the output? '; print_r($item); echo ''; ?>

PHP MCQs

What would be the output of the following code?

<?php

$arr = array("foo",

             "bar",

             "baz");

for ($i = 0; $i < count($arr); $i++) {

  $item = $arr[$i];

}

echo "<pre>";

print_r($item);

echo "</pre>";

?>

Answer

Correct Answer: baz

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it