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



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

Answer / rajan vardawaj

2 ways:
a) sizeof($array) - This function is an alias of count()
b) count($urarray) - This function returns the number of
elements in an array. Interestingly if you just pass a
simple var instead of an array, count() will return 1.

Is This Answer Correct ?    17 Yes 0 No

Post New Answer

More PHP Interview Questions

How escape single quotes php?

0 Answers  


What is the difference between echo and print statement?

11 Answers   Rushmore Consultancy,


For image work which library is used in php?

0 Answers  


What are the correct and the most two common way to start and finish a PHP block of code?

0 Answers  


How many open modes available when a file open in PHP?

0 Answers  






How to get the length of string?

0 Answers  


What is a procedure in php?

5 Answers   Wipro,


How to get best php developer Experience in Php with Sugar CRM / VTiger.

0 Answers  


hi here one small project given to me in an software company during interview. one page that would count down till 9pm (today means every day before 9pm it would count down to zero) this means there will show how many mins. sec. and hours are left till 9pm so it would be like 1 hr 20 mins 23 sec. then it up count down every sec and then show 1hr 20mins 22sec left till 9pm once the count down reaches zero it would show a flesh player video will autostart. the flash player will be from http://www.longtailvideo.com/players/jw-flv-player/ (the player is embed into the page.) that same page will track to see if they have already seen the video using php sessions then if they go back to that page it would redirect them to a new page saying that they have already wathed the video.

1 Answers  


What are the different data types in javascript?

0 Answers  


Whether php supports microsoft sql server?

0 Answers  


What are the advantages of object-oriented programming in php?

0 Answers  


Categories