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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is node js better than php?

1078


What is user defined function in php?

931


How do I escape data before storing it into the database?

926


What are string functions?

898


What is the use of hooks?

914


Why php is sometimes called as embedded scripting language?

905


With a heredoc syntax, do I get variable substitution inside the heredoc contents?

1035


Why die is used in php?

959


What is the difference between php 5 and php 7?

913


Tell me how to strip whitespace (or other characters) from the beginning and end of a string?

921


How to execute an sql query?

934


What are the encryption functions available in PHP?

1070


How do you pass a variable by value?

1003


What is T_PAAMAYIM_NEKUDOTAYIM?

1144


How many functions are there in php?

951