PHP Questions Home
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I find the size of an array?


You can find the number of values in an array using the function count, like this:

<?php
$values 
range("A","Z");
echo 
count($values);
?>


This will print "26" to the screen.

Alternatively you can use sizeof($arrayname) instead - it will return the same result.



ASK A QUESTION

More arrays PHP Questions

How can I sort a multi-dimensional array?

How can I sort an array keeping the correlation between the index and value?

I want to invert my value in array how can I do this?

How do I remove the first element from an array?

How do we sort an array of names taken from a text file, displaying only unique names?



Custom Search