There are always error prompts when you debug your program today:
Notice: Undefined offset:23 in XXX. php on line8
Notice: Undefined offset:24 in XXX. php on line8
This problem is very often in the array, the program is able to run correctly, but on the screen there will always be such a hint: notice:undefined offset: ... The internet is commonly used to suppress the display of the method, that is, change the php.ini file error_repoting parameter is "Eall & Notice", so that the screen can be displayed normally.
The problem is solved, but I can't get through offset: what the next number (such as notice:undefined offset:24 ...) means. Also, the syntax of the sentence is clearly correct and why there is a warning. Calmly thinking for several times and trying every possible, Finally found the answer. Offset: The next number is an error in the array subscript, is generally beyond the range of the array, such as the definition of the array $a[] There are 10 of the number of $a[10, if there is an error (notice:undefined offset:10 ...), Because the subscript of the array starts at 0, so the subscript of this array can only be 0~9. So in the case of this kind of problem, do not rush to suppress the display of the method (more simply can be in the front of the current file with a "error_reporting (offset: the next number); Be sure to pay attention to the array subscript you use, think carefully, the problem will soon be solved! It is possible to unset an array and then try to read its contents!