This question already has an answer here:
- The 3 different equals 5 answers
<?php
$honorifics = array("None", "Miss", "Ms.", "Mrs.", "Mr.", " Mx", " Dr.", "Prof.", "Rabbi", "Reverend", "Imam");
?>
<?php foreach ($honorifics as $index => $honor){
if ($index = 0) {
continue;
}
echo ( $index );
}?>
prints out
00000000
why?
I saw that removing the continue fixes the problem, but thats not what I want. I wan't to understand what's going wrong.
how to fix?
</div>