Say i have a variable $string_var = "Once upon a time";

is there a way to do this:

Switch($string_var)
{
  case(contains "Once"):
   doSomething();
   break;
  case(contains "the end.")
   doOtherThing();
   break;
  case(contains "time")
   doNothing();
   break;
  default:
    echo "ERROR"
}

Thanks
Alex




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to