ArrayIterator::valid --
Check whether array contains more entries
Syntax
bool ArrayIterator::valid ( void )
This function checks if the array contains any more entries.
Example 1. ArrayIterator::valid() example
<?php $array = array('1' => 'one');
$arrayobject = new ArrayObject($array); $iterator = $arrayobject->getIterator();
var_dump($iterator->valid()); //bool(true)
$iterator->next(); // advance to the next item
//bool(false) because there is only one array element var_dump($iterator->valid()); ?>
Php arrayiterator valid Function syntax tag
arrayiterator valid php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php arrayiterator valid syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.