Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 is the difference between substr() and strstr()?

0 Answers  


What library is used for pdf in php?

0 Answers  


What is the function to count elements in an array in PHP?

0 Answers  


Can you give example for trait in php?

0 Answers  


i am a php programmer can i be a java programmer?

3 Answers  


how to do connectivity of 2 dbs in PHP script?

3 Answers   TCS,


Who is the father of PHP and explain the changes in PHP versions?

2 Answers   Rushmore Consultancy,


Does strlen include null?

0 Answers  


Is nan in php?

0 Answers  


What is difference between mysqli and mysql?

0 Answers  


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()

6 Answers  


How is php different from other languages?

0 Answers  


Categories