note 117715 deleted from function.next by cmb

From: Date: Thu, 30 Jul 2015 13:14:37 +0000
Subject: note 117715 deleted from function.next by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-203223@lists.php.net to get a copy of this message
Note Submitter: JumpIfBelow ---- As some wants to know if the array has another element after. There is an issue when the next element is FALSE, you don't know if the element is FALSE or if the function next() returns FALSE because there isn't another element. Now, you're aware of that, I have my quick "has_next", which will work if there is no FALSE value in the array. <?php function has_next(array $a){ return next($a) !== false; } ?>

« previous php.notes (#203223) next »