<?php session_start();?>
<?php
!isset($_GET["id"]) ? header("Location: store.php") : $id = $_GET['id'];
?>
<?php
$_SESSION["items"][$id] = 1;
print_r($_SESSION);
?>
This outputs
Array
(
[items] => Array
(
[1] => 1
[] => 1
[2] => 1
[3] => 1
)
)
There always appears one key empty. Why that key is empty.
print_r($_GET)to your question?