Here's the code I wrote tonight:
for($r = 0; $r < $membercount; $r++) {
if($info[$r]['rank'] == 0){
$rank = "Domina";
} elseif($info[$r]['rank'] == 1){
$rank = "Praefect";
} elseif($info[$r]['rank'] == 2){
$rank = "Treasurer";
} elseif($info[$r]['rank'] == 3){
$rank = "Imperator";
} elseif($info[$r]['rank'] == 4){
$rank = "Legionis";
} elseif($info[$r]['rank'] == 5){
$rank = "Tribunis";
} elseif($info[$r]['rank'] == 6){
$rank = "Centurion";
} elseif($info[$r]['rank'] == 7){
$rank = "Templar";
}else {
$rank = "Tiro";
}
}
I keep returning "Centurion" for all the ranks. It should not be doing this. I'm not certain what I'm doing wrong here.
$info[$r]['rank']
.. reads the array for a rank number 0 through 8. I just want it to convert the rank number to a readable title based on my options above. Anyone spot something I'm doing wrong here?