Tommy D’s Sexy Blog

TagLine Here

PHP Tip, using sizeof() or count()

Filed under: PHP Tips — Tommy D. at 10:19 am on Wednesday, June 29, 2005

If you need to determine the number of elements in an array, you can use either sizeof() or count():

<?
$foo = array(“one”, “two”, “three”);
echo count($foo); //will output 3
echo sizeof($foo); // will output 3
?>

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

 

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin