Undefined Offset Array [closed]

Try to initialize value at 3rd index.

$_SESSION['basket'][3] = 0;

Or the better solution is

$_SESSION['basket'][3] = isset($_SESSION['basket'][3]) ? $_SESSION['basket'][3] : 0;

Instead of only

$_SESSION['basket'][3];

Browse More Popular Posts

Leave a Comment