Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following PHP code?
<?php
$people = array(“Peter”, “Susan”, “Edmund”, “Lucy”);
echo pos($people);
?>

What will be the output of the following PHP code?
<?php
$people = array(“Peter”, “Susan”, “Edmund”, “Lucy”);
echo pos($people);
?>
a) Lucy
b) Peter
c) Susan
d) Edmund

Answer: b
Explanation: 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