Whats wrong in the array_values() function.
I tried assigning the $updated_f to array().
I get Warning: array_values() expects parameter 1 to be array, null given
$this_params = array_merge_recursive($params, array('f' => array($filter['prefix'] => array($item['id']))));
if (isset($this_params['f'])) {
$updated_f = array();
//Updated code
if(isset($this_params['f']) && is_array($this_params['f']) && count($this_params['f']) >0)
{
foreach($this_params['f'] as $f_key => $assoc_array) {
$updated_f[$f_key] = array_values($assoc_array); //Warning here
}
}
$this_params['f'] = $updated_f;
}
$this_params['f']and you'll see it...var_dump($this_params['f']);ORecho "<pre/>";print_r($this_params['f']);and check is it printing an array or not? to prevent yourself from error you need to add:-if (isset($this_params['f']) && is_array($this_params['f']) && count($this_params['f']) >0) {$assoc_array