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 |
What is the difference between substr() and strstr()?
What library is used for pdf in php?
What is the function to count elements in an array in PHP?
Can you give example for trait in php?
i am a php programmer can i be a java programmer?
how to do connectivity of 2 dbs in PHP script?
Who is the father of PHP and explain the changes in PHP versions?
2 Answers Rushmore Consultancy,
Does strlen include null?
Is nan in php?
What is difference between mysqli and mysql?
Which is the best method to fetch the data from mysql? 1.mysql_fetch_array() 2.mysql_fetch_object() 3.mysql_fetch_row() 4.mysql_fetch_assoc()
How is php different from other languages?