RE: [PHP] checking to see if part of a variable exists?

From: Date: Mon, 21 May 2001 10:50:08 +0000
Subject: RE: [PHP] checking to see if part of a variable exists?
Groups: php.general 
Request: Send a blank email to php-general+get-53692@lists.php.net to get a copy of this message
http://www.php.net/manual/en/function.strstr.php if (strstr ("i like beer", "beer")) { // it's in there } else { // it's not } -----Original Message----- From: Sandeep Hundal [mailto:Sunny@mviva.net] Sent: 21 May 2001 11:39 To: Php (E-mail) Subject: [PHP] checking to see if part of a variable exists? hi all! i need to see if a $variable has a piece of text included in it. how do i do that? i need to do something like: if ($variable =matches= "@monkeys.com") { then do this} tia! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net ********************************************************************** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' **********************************************************************

« previous php.general (#53692) next »