Re: Upper or Lower Case

From: Date: Tue, 07 Aug 2001 16:17:38 +0000
Subject: Re: Upper or Lower Case
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61650@lists.php.net to get a copy of this message
Hi Taz, What happens if they type "NeO", or "NEO", or "nEo", or "neO" (etc)? ;) Also, if you're using this in a large application (or intend to in the future), are you going to type out all of the names as you have done with the neo example? Bjorn's method is much better, and you're better off getting into good practice early. James "Tarrant Costelloe" <tcostelloe@insur-e.net> wrote in message news:B8DC55700B11DA4F8AA61B2803F3D1A80DC489@insure-ems.insur-e.net... > Ok thanks, > > I found jons way the easiest: > > if ($name == "neo" || $name == "Neo") > > > -----Original Message----- > From: Bjorn Van Simaeys [mailto:cyberplasma@yahoo.com] > Sent: 07 August 2001 16:24 > To: php-general@lists.php.net > Subject: Re: [PHP] Upper or Lower Case > > > Hi, > > I have run accross this problem too, and I solve it > this way: > > if(strtolower($name1) == strtolower($name2)) > > I compare both variables in lower case, this way > capitals don't matter at all. > > > Greetz, > Bjorn Van Simaeys > www.bvsenterprises.com

« previous php.general (#61650) next »