note 18457 added to function.strstr

From: Date: Wed, 23 Jan 2002 18:34:07 +0000
Subject: note 18457 added to function.strstr
Groups: php.notes 
Request: Send a blank email to php-notes+get-25752@lists.php.net to get a copy of this message
if i wanted the string to check on 2 variables then come out with and outcome if they didnt exist how wud i do so? this is what ive done so far: <?php if(strstr($name,"Richard Daw")) { ?> <center><b>Your welcome to come any time!</b></center> <? } else { ?> <center><b>Your not welcome here boyo!</b></center> <? } ?> You understand? So if i wanted it to check on 2 names e.g. Richard Daw and Matt to make it come out with "your welcome here" and if anyone else say "your not welcome here" Thanks -- http://www.php.net/manual/en/function.strstr.php http://master.php.net/manage/user-notes.php?action=edit+18457 http://master.php.net/manage/user-notes.php?action=delete+18457 http://master.php.net/manage/user-notes.php?action=reject+18457

« previous php.notes (#25752) next »