By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,855 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

use of undefined constant

cassbiz
100+
P: 202
I just upgraded to PHP5 and now most of my stuff doesn't work :(

In the error log I am getting a string (this happens on every call to the language file)

Expand|Select|Wrap|Line Numbers
  1. PHP Notice:  Use of undefined constant Welcome - assumed 'Welcome' in /includes/en.php on line 206
  2.  
The language file is being called by
Expand|Select|Wrap|Line Numbers
  1. include $include_path."en.php";
  2.  

The string that I am using is in the pages are
Expand|Select|Wrap|Line Numbers
  1. echo "{$t_admin['Welcome']}";
  2.  
Here is a snippet from the en.php
Expand|Select|Wrap|Line Numbers
  1. $t_admin[Welcome] =     "Welcome";
  2.  

If anyone can see the error here I would greatly appreciate it. My next task will be to find out why all the dates have reverted to 31.12.1969
Feb 20 '07 #1
Share this Question
Share on Google+
4 Replies


Motoma
Expert 2.5K+
P: 3,235
I just upgraded to PHP5 and now most of my stuff doesn't work :(

In the error log I am getting a string (this happens on every call to the language file)

Expand|Select|Wrap|Line Numbers
  1. PHP Notice:  Use of undefined constant Welcome - assumed 'Welcome' in /includes/en.php on line 206
  2.  
The language file is being called by
Expand|Select|Wrap|Line Numbers
  1. include $include_path."en.php";
  2.  

The string that I am using is in the pages are
Expand|Select|Wrap|Line Numbers
  1. echo "{$t_admin['Welcome']}";
  2.  
Here is a snippet from the en.php
Expand|Select|Wrap|Line Numbers
  1. $t_admin[Welcome] =     "Welcome";
  2.  

If anyone can see the error here I would greatly appreciate it. My next task will be to find out why all the dates have reverted to 31.12.1969
You need to enclose the key name in quotes if it is not a variable:
[PHP]
$t_admin[Welcome]; // ERROR
$t_admin['Welcome']; // Correct
$index = "Welcome";
$t_admin[$index]; // Correct
[/PHP]
Feb 20 '07 #2

cassbiz
100+
P: 202
Thank that helped and corrected the errors.

Any ideas on why all of my calendars and such would have reverted back to 31.12.1969?
Feb 20 '07 #3

Motoma
Expert 2.5K+
P: 3,235
Thank that helped and corrected the errors.

Any ideas on why all of my calendars and such would have reverted back to 31.12.1969?
No idea.
Perhaps if you post some erroneous code, I could help.
Feb 20 '07 #4

cassbiz
100+
P: 202
No idea.
Perhaps if you post some erroneous code, I could help.
Let me get back to you on that.

LOL

I think I just found my stupid pills and now have to look at what is (most likely) causing the problem.

Thanks for the help.
Feb 20 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.