Re: constants
| From: | Haseeb | Date: | Tue, 22 Jul 2003 00:37:40 +0000 |
| Subject: | Re: constants | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156055@lists.php.net to get a copy of this message | ||
hi,
you can use constants whenever you want something whose value you don't want
changed accidently.for e.g. i use a constant to keep track of the path.
if i am at the root level then i store "./" in it. and if i am one folder
under the root then i store "../" in it. now as i tend to name variables
like this strPath (str for string) i often end up changing the value of
strPath to something else in the script. to stop this from happening i use
constants
HTH,
Haseeb
-------Original Message-------
From: Michael Müller
Date: Monday, July 21, 2003 04:22:03 PM
To: php-general@lists.php.net
Subject: [PHP] constants
hi,
why should I use constants?
thx for help
Michael
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php