This WARNING is a NOTICE or WARNING for a different version of PHP. It is not an ERROR. PHP works fine when variables are used undeclared in PHP, but in a PHP5 environment, the above warning or prompt will appear. After the search query, we conclude the following three methods to solve Notice: Undefined Index.
the first method: modify the PHP configuration file, to block such warnings and tips to modify the PHP. Ini configuration file, modify the error_reporting for error_reporting = E_ALL & amp; ~ E_NOTICE. Notice and WARNING in the program will be ignored, of course, this is not suitable for beginners, not only inconvenient to debug the program, and is not conducive to the formation of good code habits.
the second method: initialized for each variable assigned a null or any value, does not affect the operation. $blank = “; $blank = “; $blank = “; $price = “15” :$car = “Truck” :
price = “15” :$car = “Truck” :
modifier disallows warnings caused by function calls, but this modifier does not disallow the display of errors.
Read More:
- After upgrading php7, PHP program prompts an error: operator not supported for strings in causes and Solutions
- ERR_CONTENT_DECODING_FAILED error occurs in PHP program, summary of solutions
- PHP connection PostgreSQL error call to undefined function PG_ connect()
- Parse error: syntax error, unexpected T_OBJECT_OPERATOR in E:\WWW\blog\hyii2\frontend\web\index.php
- PHP error: call to undefined function curl_ init() window
- Solutions for undefined reference to ‘xxx’ encountered during linking
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()
- [TS] solutions to line 0: parsing error: cannot read property ‘map’ of undefined
- String index out of range: 100 error report details and Solutions
- On set in pandas_ Index and reset_ Usage of index
- [Solved] Es delete all the data in the index without deleting the index structure, including curl deletion
- Solutions to the problem of “symbol lookup error xxxxx, undefined symbol”
- Python common error: if using all scalar values, you must pass an index (four solutions)
- Index error: invalid index to scalar variable
- Wechat payment API V3 payment notice asynchronous signature verification failed
- Several solutions to HDF5 error reporting in Python environment
- Solutions to errors in virtual machine running in Android studio
- PHP link database error PHP_ network_ getaddresses: getaddrinfo failed: Name or service not known
- Elasticsearch in Spring uses Spel to dynamically create Index of Documet class
- PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[08004] [1040] Too many connections