PHP Warning: Use of undefined constant
Posted on 2004-09-15
How to avoid Warning logs for an undeclared variables in PHP?
I have used many variables as,
$_SESSION[dbConnectInfo][host] = "localhost";
$_SESSION[dbConnectInfo][username] = "root";
$_SESSION[sitePD] = $ROOT_PATH;
and so on.
Errors are as follows,
[Wed Sep 15 04:42:23 2004] [error] PHP Warning: Use of undefined constant dbConnectInfo - assumed 'dbConnectInfo' in /../../../php/master.php on line 17
How to avoid these error logs. PLease give solutions for this to avoid. But I do not want to supress warning logs.