PHP error Notice: Undefinedindex solution. I set error_reporting to E_ALL. when reading data, for example, $ row [name], many Notice: Undefinedindex: errors may occur. what should I do? Error_reporting (E_ALL ~ E_NOTICE) so I set error_reporting to E_ALL.
When reading data, for example, $ row ['name ']
There will be many Notice: Undefined index: errors,
What should I do? Error_reporting (E_ALL &~ E_NOTICE) is that true?
Undefined index: indicates the error in your code: "variables are Undefined and values are used." This is not a fatal error and will not force your php code to stop running, however, there is a potential risk of problems. Therefore, we recommend that you modify it ~~~~
This type of notice content does not affect the use of non-fatal issues.
Use E_ALL &~ E_NOTICE can disable notice Display. However, it is recommended that you change the code better :)
Code is always well written, so there will be fewer problems in the future :)
Enabling this notice display is also helpful for debugging errors ~~~~
If you use $ row = mysql_fetch_array ($ result,
When echo $ row ['name'], the Notice: Undefined index: problem occurs again, which may be:
1. the SQL statement is incorrect. The value in the name field is not read,
2. failed to execute the SQL statement and did not read any value
3. the SQL statement is correct and fails, but no matching record is found. Naturally, no $ row ['name']
4. Miscellaneous
Notice generally prompts errors that are not directly related to the execution code, but do not forget that notice sometimes returns redundant error messages.
When reading data such as $ row ['name'], there will be many Notice: Undefined index: Errors. what should I do? Error_reporting (E_ALL ~ E_NOTICE) is that true...