I have two arrays
array1 (
"akey1" => "dfksjhf"
"akey2" => "adasjkgffs"
"akey3" => "afkjhsafshfkah"
)
array2 (
"akey2" => "could be anything..."
)
I'm looking for a PHP function that I can supply the two arrays to and the following will happen:
If both arrays have an identical key (regardless of data) then remove the key from array 1 and return the remainder of array 1.
The function if ran would return:
array3 (
"akey1" => "dfksjhf"
"akey3" => "afkjhsafshfkah"
)
Is there a PHP function that can do this already and if not what would be the fastest and most efficient way of doing this function in PHP?
Many Thanks