String. If contains

From: Date: Wed, 30 Aug 2000 09:03:02 +0000
Subject: String. If contains
Groups: php.general 
Request: Send a blank email to php-general+get-14352@lists.php.net to get a copy of this message
Hello! I need to know if a string contains a word (or character). What's the best solution for this? Please see below. This is what i need to know how to do.... $string = "It's a sunny morning in Sweden today!" if ($string contains "sunny") { echo "the string contained the value "sunny"; } Thanks in advance. Anders

« previous php.general (#14352) next »