No it doesn't seem to like that either...
The weird thing is that if I used <> instead of = it's fine...although that is not the
result I want...
----- Original Message -----
From: Tyler Longren
To: James Bartlett
Cc: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 3:21 AM
Subject: Re: [PHP] Variables
Try
if($text1 == "$text2")
{
echo "The variables are equal";
}
else
{
echo "The variables are not equal";
}
notice the change in the if()
Tyler
On Wed, 11 Jul 2001 03:12:56 +0100
"James Bartlett" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This might sound really simple but plz humour me :)
>
> How can I tell if two text variables are equal to one another?
>
> If I use..
>
> if($text1 = $text2)
> {
> echo "The variables are equal";
> }
> else
> {
> echo "The variables are not equal";
> }
>
> then the code in the else state is always printed even if I know for a fact that
the variables are equal...
>
> Any suggestions?
>
> James
>
--
Tyler Longren
[EMAIL PROTECTED]
Currently Unemployed
www.noworkfortyler.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]