Re: Variable Names

From: Date: Sat, 15 Jan 2000 15:28:54 +0000
Subject: Re: Variable Names
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-14651@lists.php.net to get a copy of this message
----- Original Message ----- From: Chuck Daubenspeck <chuckd@bellatlantic.net> To: <php-dev@lists.php.net> Sent: Saturday, January 15, 2000 10:11 AM Subject: [PHP-DEV] Variable Names : : Can anyone explain why the following: : : print "Success: $success<br>"; : print "avs-code: $avs-code<br>"; : print "auth-code: $auth-code<br>"; : print "auth-msg: $auth-msg<br>"; : : would return: : : Success: no : avs-code: -code : auth-code: -code : auth-msg: -msg : Use print "avs-code: " . $avs-code . "<br>"; Otherwise PHP is evaluating $avs (not defined) and adding on the constant -code. Using the string concatation operator should take care of this Sterling Hughes sterling@designmultimedia.com

« previous php.dev (#14651) next »