Re: beginner code help

From: Date: Fri, 07 Sep 2001 16:50:02 +0000
Subject: Re: beginner code help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66435@lists.php.net to get a copy of this message
There is no parse error in this code. Check the line before that one. And see stristr(), strcasecmp() and strtolower() for ways to do case independant comparisons. -Rasmus On Fri, 7 Sep 2001, Nikola Veber wrote: > Hi ! > > Can anyone tell me why this line returns the parse error > > if (strstr($name, "firstname") or strstr($ime, "lastname")){ > } > > With this line I'd like to determine if string $name , which contains both first and > last name, has earlier defined first and last name, with no difference of the > order(name is first, surname last or oposite). > Can anyone tell me how to compare string values in non-case sensitive way(with > no difference between upper and lower case characters Name == name) > > >

« previous php.general (#66435) next »