PHP | ArrayIterator count() Function Last Updated : 14 Jan, 2022 Comments Improve Suggest changes Like Article Like Report The ArrayIterator::count() function is an inbuilt function in PHP which is used to count the elements of array iterator.Syntax: int ArrayIterator::count( void ) Parameters: This function does not accept any parameters.Return Value: This function returns the number of element present in the array iterator.Below programs illustrate the ArrayIterator::count() function in PHP:Program 1: php <?php // Declare an ArrayIterator $arrItr = new ArrayIterator( array('G', 'e', 'e', 'k', 's') ); // Count the element into array iterator echo $arrItr->count(); ?> Output: 5 Program 2: php <?php // Declare an ArrayIterator $arrItr = new ArrayIterator( array("Geeks", "for", "Geeks"), ArrayIterator::STD_PROP_LIST ); // Count the array element echo $arrItr->count(); ?> Output: 3 Reference: https://www.php.net/manual/en/arrayiterator.count.php Create Quiz Comment J jit_t Follow 0 Improve J jit_t Follow 0 Improve Article Tags : Web Technologies PHP PHP-function Explore BasicsPHP Syntax4 min readPHP Variables5 min readPHP | Functions6 min readPHP Loops4 min readArrayPHP Arrays5 min readPHP Associative Arrays4 min readMultidimensional arrays in PHP5 min readSorting Arrays in PHP4 min readOOPs & InterfacesPHP Classes2 min readPHP | Constructors and Destructors5 min readPHP Access Modifiers4 min readMultiple Inheritance in PHP4 min readMySQL DatabasePHP | MySQL Database Introduction4 min readPHP Database connection2 min readPHP | MySQL ( Creating Database )3 min readPHP | MySQL ( Creating Table )3 min readPHP AdvancePHP Superglobals6 min readPHP | Regular Expressions12 min readPHP Form Handling4 min readPHP File Handling4 min readPHP | Uploading File3 min readPHP Cookies9 min readPHP | Sessions7 min read Like