I create my array like this:
$_SESSION['ECpc'] = $productcodeEC;
$_SESSION['ECid'] = $rij['products_id'];
$_SESSION['ECprijs'] = $rij['products_price'];
$_SESSION['ECnaam'] = $rij['products_name'];
And add stuff to it like this:
array_push($_SESSION['ECpc'], $productcodeEC);
array_push($_SESSION['ECid'], $rij['products_id']);
array_push($_SESSION['ECprijs'], $rij['products_price']);
array_push($_SESSION['ECnaam'], $rij['products_name']);
And I delete from it like this:
array_splice($_SESSION['ECpc'],$id,1);
array_splice($_SESSION['ECid'],$id,1);
array_splice($_SESSION['ECprijs'],$id,1);
array_splice($_SESSION['ECnaam'],$id,1);
It all works fine, unless I delete $id = 0, then php always deletes $id = 0 and $id = 2...
???