Without seeing your code, it's difficult to determine which approach would be best. However, there are a few ways of doing this. Below are some untested examples. But please use them as examples as there are far easier and better ways of doing this. I am simply trying to point you in the right direction.
$array = array_search([SEARCH TERM], array_keys([YOUR ARRAY]));
$results = [];
$array_keys = array_keys([YOUR ARRAY]);
for($i = 0; $i < count($array_keys); $i++) {
if($array_keys[$i] == "[SEARCH TERM]") {
$results[] = $[YOUR ARRAY][$i];
}
}
Also try: php search array key and get value
Edit: this is pure PHP - as you are using laravel, there are definitely better ways of doing this. Please read the documents for pluck