I have an array $old_que_ans_session which is
Array
(
[1] => Array
(
[home] => https://s3.ap-south-1.amazonaws.com/bmimagedump/uploads/interior/design/1533365337.jpg
)
[3] => Array
(
[home] => https://s3.ap-south-1.amazonaws.com/bmimagedump/uploads/interior/design/1531557283.jpg
)
[4] => Array
(
[home] => https://s3.ap-south-1.amazonaws.com/bmimagedump/uploads/interior/design/1531557681.jpg
)
)
I need to unset an element in the array based on its value. For that I am doing the following to get the key
$key1=array_search($da1, array_column($old_que_ans_session,$da));
unset($old_que_ans_session[$key1]);
where $da = home and $old_que_ans_session is the above mentioned array. The $key1 that I am getting is 2 but there is no key value as 2 in the above mentioned array.
How to solve this problem.