?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$people = array("Peter", "Susan", "Edmund", "Lucy");
echo pos($people);
?>
<?php
$people = array("Peter", "Susan", "Edmund", "Lucy");
echo pos($people);
?>
Answer & Solution
Correct Answer:
Option
B
The pos() function returns the value of the current element in an array, and since no operation has been done, the current element is the first element.
Join the Discussion
Login to post a comment or share your explanation.
Login