How would I unset category[1] from the below array?
Array
(
[category] => Array
(
[0] => add new
[1] => second
)
)
Can’t seem to get the right code.
This is for codeigniter’s session class
$this->session->unset_userdata($array['category'][$session_id]);
is the above correct? or is there something else – that’s not working.
Assuming your array name is
$array:Another way is,
array_pop()