switch statement question

From: Date: Tue, 13 Aug 2002 15:47:33 +0000
Subject: switch statement question
Groups: php.general 
Request: Send a blank email to php-general+get-112346@lists.php.net to get a copy of this message
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

« previous php.general (#112346) next »