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

What kind of variable is age?

0 Answers  


How to set cookies in PHP?

0 Answers  


Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?

4 Answers  


Is php a strongly typed language?

0 Answers  


What is mean by RSS?How can i use this?

1 Answers   TCS,


What are super global variables in php?

0 Answers  


How can we destroy the session, how can we unset the variable of a session?

5 Answers  


How do you count numbers in php?

0 Answers  


write a program to generate bill screen 1.1st page should get the number of products to be billed. 2.2nd page should display the number of rows according to the number of products given in the first page. 3.Each row should have a text box for a.product name b.quantity c.unit price d.item price = quantity x unit price This should be automatically calculated not to be entered by the user. 4.After entering the products calculate sales-tax for the total amount which 8.25%. 5.After entering these values you have to generate the bill in the next page with a unique number for the bill. can anyone solve this problem..i am in need to solve this problem..pls help me

1 Answers   Yahoo,


How do you display the output directly to the browser?

0 Answers  


What is foreach loop in php?

0 Answers  


What are the uses of explode() function?

0 Answers  


Categories