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);
?>
A. Lucy
B. Peter
C. Susan
D. Edmund
Answer: Option B
Solution(By Examveda Team)
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.Related Questions on Arrays
A. karnataka 11,35,000
B. 11,35,000
C. population 11,35,000
D. karnataka population
Which function will return true if a variable is an array or false if it is not?
A. this_array()
B. is_array()
C. do_array()
D. in_array()
Join The Discussion