I have some filters:
$filters = array('rooms-4-5', 'city-london-berlin-paris');
and I wanna create a array like this:
array(
'rooms' => array('4', '5'),
'city' => array('london', 'berlin', 'paris')
);
I tried:
foreach($filters as $filter):
$filter = explode('-', $filter);
$data[$filter[0]] = array();
array_shift($filter);
foreach($filter as $value):
//here I am stuck ...
endforeach;
endforeach;