<?php $array = [ 'index' => 'value', 'mutex' => 'foo', 'dexter' => 'morgan' ]; $matches = array_filter($array, function ($key) { return false !== strpos($key, 'dex'); }, ARRAY_FILTER_USE_KEY); var_dump($matches);
You have javascript disabled. You will not be able to edit any code.