Delete an element from an array in php without array_search
I want to delete an array element from array, but I dont know the array key of that element only value is known
It is possible by array_search with value, first to find the key and then use unset
Is there any inbuilt array function to remove array element with array value ?
You can only remove element from array only by referencing to this KEY. So you have to get this KEY somehow. The function to get the key for the searched value from array is exactly
array_search()function which returns KEY for given VALUE.