strcmp returns 0 if the two strings are equal.
In any case, why not just do
if ($city == $city_new) $error = true;
> -Original Message-
> From: andy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 9:10 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] compari
Hi there,
I would like to compare 2 strings.
I do always get a 0 return (not equal) but they are difinatelly equal, I
double checked it. They are just in two different vars.
Here is how I did it:
if (strcmp($city, $city_new) != 0) $error = true;
Does anybody see the error? Or am I going the
2 matches
Mail list logo