Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
PHP
« Previous
Next »
How can we count the number of elements in an array?
Options
- Using sizeof()
- count()
- Writing a user defined function and using array_search()
- Both a and b
CORRECT ANSWER : Both a and b
Discussion Board
Count
Answer : Both a and b above.
The count() function returns the number of elements in an array.
The sizeof() function returns the number of elements in an array.
Syntax :
count(array,mode);
sizeof(array,mode);
IamJay 02-9-2015 06:22 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
PHP (39)
DHTML (10)
CSS (21)
MySQL (20)
VLSI (9)
XML (28)
UML (11)
HTML (19)
Fedora (61)
HTML5 (60)
Android (100)
Advertisement
▲