How can we know the count/number of elements of an array?
Answers were Sorted based on User's Feedback
Answer / devendrarjadav
count(array) function returns the total number of elements
of specified array.
| Is This Answer Correct ? | 19 Yes | 4 No |
Answer / mahesh
$std=$mb->Get_Students();
then using
$cnt = count($std);
echo $cnt;
will display the total number of that array
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / joseph george c
you can get the no: of elements in the array through
count()
syntax:
count($arrayname);
| Is This Answer Correct ? | 7 Yes | 1 No |
Why many companies are switching their current business language to php?
what is the difference between GET and POST?
21 Answers AdVine, Evon Technologies, GVD Infotech, RedAlkemi, SoftSol,
What is a persistent cookie in php?
What are the differences between require and include, include_once?
Which function is used to strip whitespace?
What are php parameters?
How do I install php?
Are php sessions secure?
How can we change the maximum size of the files to be uploaded?
What is the function func_num_args() used for?
1. Write a function to swap two values ? $a = 10; $b = 20; echo $a, $b; swap(); // If u want u can pass parameters echo $a, $b; // It should print 20 , 10
14 Answers Aquasol, Infosys, TCS, Torque Infotech,
What is alias in php?