Shorthand Question

    Date: 12/18/07 (PHP Community)    Keywords: no keywords

    I think I saw someone reference this in a previous comment (my searching has not rewarded me an answer) so here goes.

    Let's say I want to see if $foo is or is not several things. Is there a way to say:

    if ($foo == "a", "b", "c") rather than if ($foo == "a" || $foo == "b" || $foo == "c")

    I know I could always make the options an array and see if $foo is in the array, but I thought I'd ask if the whole comma thing (or something like that where you just aren't typing $foo over and over) exists.

    Source: http://community.livejournal.com/php/604667.html

« random text || Compiling PHP, having... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home