Re: How to reference global variables in strings
| From: | Steve Edberg | Date: | Mon, 05 Feb 2001 20:30:27 +0000 |
| Subject: | Re: How to reference global variables in strings | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38311@lists.php.net to get a copy of this message | ||
At 10:57 AM -0700 2/5/01, Karl J. Stubsjoen wrote:
If you don't prefix a global variable with $ then how can you interpit a global variable within a string? AS IN: define ("MY_PATH", "/home/me/"); print("This is My Path: MY_PATH or is it?");This wouldn't be a global variable; rather, it's a constant. And, you'd reference it like print("This is My Path: ".MY_PATH." or is it?"); See http://www.php.net/manual/en/function.define.php and http://www.php.net/manual/en/language.variables.php -steve -- +--- "They've got a cherry pie there, that'll kill ya" ------------------+ | Steve Edberg University of California, Davis | | sbedberg@ucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-------------------------------------- FBI Special Agent Dale Cooper ---+