•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 363,798 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,633 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 175 | Replies: 3 | Solved
![]() |
•
•
Join Date: Feb 2008
Location: Ottawa, Ontario
Posts: 15
Reputation:
Rep Power: 1
Solved Threads: 3
I have a question about using define(). I am using this function for other constants across my script ,but am looking at developing a set of language files. For example I was thinking of having one eng_defined.php and one fr_defined.php each containing the same named constants but the output would be in different languages. When the user selects to view the site in their language of choice it would display the value of the constant in that language, but then I wondered if an issue would turn up if I used define() this way?
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,869
Reputation:
Rep Power: 32
Solved Threads: 109
I don't see a problem with this because either eng_defined.php OR fr_defined.php would be called, so it would behave just as if all of the constants were defined once. From then on, you can use define to see if the constant exists.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- Borland c++ builder question (C++)
- question on Stacks push,pop. (C++)
- A question about 'const' (C++)
- C programming question (C)
- Uber-N00B question (C++)
- typedef question (C)
- Completely new to C++ and have question about using char (C++)
Other Threads in the PHP Forum
- Previous Thread: Hopefully a straightforward PHP/MySQL question
- Next Thread: NEED help to pass javascript variable to php



Linear Mode