[PHP] problem with constants

2001-08-24 Thread Wolfgang Schneider

Hello,

I managed to setup my Win2k machine for testing purposes with php and
mysql and things appear to work fine with one strange problem ...

The same files work perfectly well when run from the server at my
ISP, but now when running them on my machine, I am getting first some
error messages such as 

Warning: Use of undefined constant link - assumed 'title' in
./lib/lib_main.php3 on line 352
Warning: Use of undefined constant link - assumed 'subtitle' in
./lib/lib_main.php3 on line 352
Warning: Use of undefined constant link - assumed 'link' in
./lib/lib_main.php3 on line 354

And then the page is properly displayed at the bottom of all those
warnings ... :-) These messages do not show up with the same files
when used at my ISP's server, but do show up on my machine here.

The constant code causing this warning message are things like the
following:
$list[title]
$list[subtitle]
$list[link]

Anyone have an idea what may be causing these warnings? It is only
with code such as  $variable[value] that these messages show up ...
and then the code is processed anyways and the page displayed.  
Thank you for any input and help to solve this problem ... 

God bless you with His grace and peace 
Wolfgang 

Looking for Biblical information? COME AND SEE! 
-- ONLINE Courses: http://classes.bibelcenter.de ... NEW!
-- BibelCenter: http://www.bibelcenter.de 
-- Bookstore: http://www.worthy.net/BibelCenter/ 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] problem with constants

2001-08-24 Thread Pavel Jartsev

Wolfgang Schneider wrote:
 
 ...
 
 Anyone have an idea what may be causing these warnings? It is only
 with code such as  $variable[value] that these messages show up ...
 and then the code is processed anyways and the page displayed.
 Thank you for any input and help to solve this problem ...
 

Use $variable['value'] or $variable[value].

Because, if you use $variable[value], then PHP thinks that 'value' is 
some constant, not string. This is why these warnings occurs.

-- 
Pavel a.k.a. Papi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]