0
I have the session $_SESSION['linha_pedagio'][]
so disposed:
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
)
)
But I need to delete one of the $_SESSION arrays, which are 0, 2 or 5.
I used the unset($_SESSION['linha_pedagio'][$id]);
but I collect the wrong value for the variable $id
,
There is a way to get this main id?
Values: 0, 2, 3, 4 and 5.
Thank you Julyano... doing this
$id => $objeto
can I still use the other data from the right array? Ex:$rota = $objeto[1]; $valor = $objeto[2];
– thiagofred
Yes, that’s right @thiagofred
– Julyano Felipe