If I have a value equal to ID 1 and search for an array, then I want to remove myself from the array where ID 1 matches. Array ([0] = & gt; Array ([ID] => 1) [1] => Array ([ID] = 4)> [2] => Array ([id] => 5) [3] = & gt; Array ([ID] => 7))
New array
Array ( [0] = & gt; Array ([ID] => 4) [1] = & gt; Array ([ID] => 5) [2] => Hey ([ID] = & Gt; 7))
I am using search_array, and I'm assuming because it is multidimensional, it is not found any way to search the array as above is?
If you check only one value, why not just use the foreach loop?
foreach ($ key as $ key = & gt; $ value) {if ($ value ['id'] == '1') {unset ($ arr [$ of]) ; }}
Comments
Post a Comment