Re: Variables

From: Date: Wed, 11 Jul 2001 02:26:45 +0000
Subject: Re: Variables
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-57292@lists.php.net to get a copy of this message
I have tried that also...it still does not want to work... ----- Original Message ----- From: Dallas K. To: James Bartlett ; php-general@lists.php.net Sent: Wednesday, July 11, 2001 5:43 AM Subject: Re: [PHP] Variables don't use the quotes.... if($test1 == $test2) { echo "True"; } else { echo "False"; } ----- Original Message ----- From: "James Bartlett" <zotud@btinternet.com> To: <php-general@lists.php.net> Sent: Tuesday, July 10, 2001 7:21 PM Subject: Re: [PHP] Variables 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: php-general@lists.php.net 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" <zotud@btinternet.com> 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 tyler.longren@midiowa.net Currently Unemployed www.noworkfortyler.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#57292) next »