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

What is the starting salary of Php developer in india?? after 1 year experience how much i could get??

How do I find out if a value is already in an array?

How can I check if a value is already in an array?

How can I create an array of numbers easily?

im getting a Resource id #5 $rs_comp = mysql_query("select * from company where autoID='$row_settings[compid]'");



Custom Search