How can we know the count/number of elements of an array?

Answers were Sorted based on User's Feedback



How can we know the count/number of elements of an array?..

Answer / devendrarjadav

count(array) function returns the total number of elements
of specified array.

Is This Answer Correct ?    19 Yes 4 No

How can we know the count/number of elements of an array?..

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

How can we know the count/number of elements of an array?..

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

Post New Answer

More PHP Interview Questions

Why using the htaccess file

2 Answers  


How can you retrieve a cookie value?

0 Answers  


How can we enable error reporting in php?

0 Answers  


what is the dirrence in PHP4 & PHP5 . ?

8 Answers  


What is varchar mysql?

0 Answers  






When a conditional statement is ended with an endif?

0 Answers  


What is difference between action hook and filter hook?

0 Answers  


What is difference between base_url and site_url?

0 Answers  


Do you know when sessions ends?

0 Answers  


Why and where do we use htaccess?

0 Answers  


What are the advantages of php mysql?

0 Answers  


Why are sessions used?

0 Answers  


Categories