<?php $starts_with = 'bk-'; $facets = [ ['name' => 'bk-0001'], ['name' => 'bk-0002'], ['name' => 'bx-0001'] ]; $new_facets = array_filter($facets, function ($var) use ($starts_with) { return substr($var['name'], 0, strlen($starts_with)) === $starts_with; }); print_r($new_facets);
You have javascript disabled. You will not be able to edit any code.