I am trying to figure out how to remove one main element and all its siblings and save the array afterwards.
Here is what i got:
$my_array = Array
(
[0] => Array
(
[username] => Pete
[userid] => 2
)
[1] => Array
(
[username] => James
[userid] => 4
)
[2] => Array
(
[username] => John
[userid] => 3
)
)
Now, what i want to do is to remove the element in where I have the userid 4 and then save it all back into $my_array like this:
$my_array = Array
(
[0] => Array
(
[username] => Pete
[userid] => 2
)
[2] => Array
(
[username] => John
[userid] => 3
)
)
Can this be done? and if yes... How???
Thanks in advance :-)