I'm working on fixing some issues on an old site that apparently my company built years before any of us worked here. Everything about the programming on this site is FUBAR. I mean everything, from the logic of how pages are laid out to the repetative use of redundent code (on the same page no less.) this morning, I stubmled across this little gem:
<?php
...
$mailing_city=$row['mailing_city'];
$mailing_cityOther=$row['mailing_cityOther'];
...
if($mailing_cityOther){
print("".stripslashes($mailing_cityOther)."");
}else{
if($mailing_cityOther){
print("".stripslashes($mailing_cityOther)."");
}else{
print("".stripslashes($mailing_city)."");
}
}
?>