Page is a not externally linkable
rocknbil - 4:18 pm on Jun 11, 2012 (gmt 0)
Generally there's no reason to use next in a for/foreach loop, and may have something to do with it. It's not like a "next" in any other languages, it is used to advance the pointer within the loop (instead of just going to the next item.) It advances the pointer by one (one more than it would in a normal for/foreach.)
You don't need to evaluate true/false, 1/0 if your array values could be empty or null. It is, or it is not, allowing you to try a more simple method:
foreach ($genders[$lang] as $value) {
if($value) {
echo key($genders[$lang]);
}
}