I have the session $_SESSION['linha_pedagio'][]
like this:
Array
(
[0] => Array
(
[0] => 2
[1] => CGO - RJA (via Magé)
[2] => 96.30
[3] => 2
[4] => 9681
)
[2] => Array
(
[0] => 4
[1] => RJA - CPQ
[2] => 224.70
[3] => 2
[4] => 493
)
[3] => Array
(
[0] => 9
[1] => RJA - BMA
[2] => 72.00
[3] => 1
[4] => 5270
)
[4] => Array
(
[0] =>
[1] => BMA X B. PIRAI
[2] => 20.00
[3] => 1
[4] => 5027
)
[5] => Array
(
[0] => 2
[1] => CGO - RJA (via Magé)
[2] => 96.30
[3] => 2
[4] => 4493
)
)
However, I need to exclude one of the $ _SESSION arrays, which are 0, 2 or 5.
I've used unset($_SESSION['linha_pedagio'][$id]);
but I've written the wrong value for the variable $id
,
Is there a way to get this parent id?
Values: 0, 2, 3, 4 and 5.