Is there a better way of doing this?
Date: 04/24/06
(PHP Community) Keywords: no keywords
if ($id=="11" || $id=="1" || $id=="2")
{
// do something
}
This is fine for one or two OR clauses, but when I have say 10 the code looks pretty ugly. Is there a better, cleaner way of coding this?
Thanks!
Source: http://community.livejournal.com/php/443084.html