RE: [PHP] A quick question

From: Date: Wed, 11 Oct 2000 18:13:30 +0000
Subject: RE: [PHP] A quick question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19645@lists.php.net to get a copy of this message
try this : if (!($value="206.20.254.3")) { echo "\$var = $value<BR>"; } you must 'escape' the "$var" as it will think it is a variable not a string, and I have found that "!=" is unreliable ! richard -----Original Message----- From: Julia A . Case [mailto:julie@MageNet.com] Sent: Wednesday, October 11, 2000 10:49 AM To: php-general@lists.php.net Subject: [PHP] A quick question The following code doesn't work as I thought it should... It prints all the $values if ($value != "206.20.254.3") print("$var=$value<BR>"); } Thanks, Julie -- [ Julia Anne Case ] [ Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for. ] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] -- 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 (#19645) next »