a more readable version of papipo's has_next function:
<?php
function has_next($array) {
$has_next = is_array($array) && next($array) !== false;
return $has_next;
}
?>
OR
<?php
function has_next($array) {
$has_next = false;
if(is_array($array)) {
$has_next = next($array) !== false;
}
return $has_next;
}
?>