Re: Variables

From: Date: Wed, 11 Jul 2001 02:21:51 +0000
Subject: Re: Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57287@lists.php.net to get a copy of this message
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

« previous php.general (#57287) next »