As @Sergio asked and inferred, be careful you look at all the answers provided on the duplicate answer link. If it is possible that "8" occurs more than once (like "15" in your example) then you'll want to consider something other than the accepted answer.
array_searchandunset.