note 66838 deleted from function.next by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 14:58:23 +0000 |
| Subject: | note 66838 deleted from function.next by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197255@lists.php.net to get a copy of this message | ||
Note Submitter: Sigmar
----
If you want to check, if there are some more elements in array after given key, you can use the
following function:
function more_array_keys($keyname, &$array) {
if (!is_array($array)) {
return false;
}
if (empty($keyname)) {
return false;
}
$set = false;
$count = 0;
foreach ($array as $key => $value) {
if ($set === true) {
$count++;
}
if ($key == $keyname) {
$set = true;
}
}
return $count > 0 ? true : false;
}