Re: Comparrison

From: Date: Wed, 27 Mar 2002 18:09:59 +0000
Subject: Re: Comparrison
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90432@lists.php.net to get a copy of this message
Ron, You probably want strstr(). or stristr(). Just as a usability recommendation on you code below, please don't restrict your pages to IE only.. This would be better: if (!strstr($HTTP_USER_AGENT,"MSIE 5.5") { print "Please note this page has functionality designed for IE5.5"; } Users of perfectly good browsers like Mozilla, Opera, and IE5/mac won't be locked out. Steve Wednesday, March 27, 2002, 7:46:12 AM, Ron wrote: R> How would I compare to variables where I would want one variable to equal R> only part or some of the other variable? R> Here is the code R> <? R> if ($HTTP_USER_AGENT !== "%MSIE 5.5%") { R> print "You must upgrade your browser"; R> } else { R> exit; R> } ?>> R> Any suggestions -- steve@mrclay.org ** http://mrclay.org

« previous php.general (#90432) next »