This might sound silly, but I'd like to know if I can check if a constant is set. I have many constants that are, or are not, set according to page displayed, user input etc. once set, the value I have to keep is always the same, so using variable would be waste of everything. I've tried isset and if clauses, but always get same notice; undefined constant constant used assuming "constant" (PHP understands it as a string?)
So, is it possible, or am I forced to use variables?
Constants
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
To be honest all I did was go to php.net and seach on constant, got this:
http://www.php.net/manual/en/function.constant.php
and found the function you needed from there.
Remember, the manual is your friend
Mac
http://www.php.net/manual/en/function.constant.php
and found the function you needed from there.
Remember, the manual is your friend
Mac