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

What are the differences between GET and POST methods?

1067


Is nan in php?

1035


How to add 301 redirects in PHP?

894


Which method do you follow to get a record from a million records? (Searching not from database, from an array in php)?

986


What is php full form?

1051


What is php good for?

916


sort term descripttion form, report and uery

2179


How can we check the value of a given variable is alphanumeric?

977


What are the advantages of stored procedures in php?

960


What does $_ post mean in php?

1057


What is the use of trim function in php?

957


Where are php configuration settings stored?

1014


What is the difference between substr() and strstr()?

1390


Where session is stored?

976


How many columns can be added in a table in mysql?

987