Notice Error in PHP

What is meant by notice error in php?
How to find it?


Notice error is used to notify the user when they try to access the undefined variable. Though a notice error is issued to the user, the error does not affect the progress in execution of the script. That is the script will continue to execute and complete.

Example code :

$test="welcome to hiox!!";
echo $test1;

Result :
Notice Undefined variable: test1 in /opt/lampp/htdocs/Demo/sampletest.php on line 3

Notice error mainly occurs by accessing the undefined variable in the program. Here, variable $test alone will be defined in the code. But, trying to execute an undefined variable $test1 would result in notice error.

PHP Topics

Ask Questions

Ask Question