i have the following array when i dd($test)
:
array:1 [
0 => {#81
+"1": "1"
+"2": "2"
}
]
and i want to remove the second field and value so the output will be
array:1 [
0 => {#81
+"1": "1"
}
]
ive been trying to use array_splice
and unset
but it doesnt get what i want to remove the field and value, am i doing something wrong? how do i make it happen? thanks in advance.