PHP Notice: Undefined index


Example

Appearance :

Trying to access an array by a key that does not exist in the array

Possible Solution :

Check the availability before accessing it. Use:

  1. isset()
  2. array_key_exists()