This is not a big thing. But I am looking at this thinking there is a way to make the code take up even less lines. Just want to stick this in my cap for future reference.
for($i=01;$i<=50;$i++) { if (!empty($content)) { if ($row[$content]==$states[$i]) echo "<option value=\"$states[$i]\" selected>$nstates[$i]\n"; else echo "<option value=\"$states[$i]\">$nstates[$i]\n"; } else { if ($dstate == $states[$i]) echo "<option value=\"$states[$i]\" selected>$nstates[$i]\n"; else echo "<option value=\"$states[$i]\">$nstates[$i]\n"; } } Basically I want to check for two possible conditions to make an item selected. If the first one is valid then do not check for the other. Get what I mean? Any expert programmers out there with the way to chop this even further? Thanks Phillip +++++++++++++++++++++++++++++++++++++++++++++++++++ IMPORTANT: This email message (including attachments, if any) is intended for the use of the individual addressee(s) named above and may contain information that is confidential, privileged or unsuitable for overly sensitive persons with low self-esteem, no sense of humor or irrational religious beliefs. If you are not the intended recipient, any dissemination, distribution or copying of this email is not authorized (either explicitly or implicitly) and constitutes an irritating social faux pas. Unless the word absquatulation has been used in its correct context somewhere other than in this warning, it does not have any legal or no grammatical use and may be ignored. No animals were harmed in the transmission of this email, although the barking dachshund next door is living on borrowed time, let me tell you. Those of you with an overwhelming fear of the unknown will be gratified to learn that there is no hidden message revealed by reading this warning backwards, so just ignore that Alert Notice from Microsoft. However, by pouring a complete circle of salt around yourself and your computer you can ensure that no harm befalls you, your family or your pets. If you have received this email in error, please add some nutmeg and egg whites, whisk and place in a warm oven for 40 minutes. +++++++++++++++++++++++++++++++++++++++++++++++++++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php