I have the following array:
array(5) {
["destino"]=> string(11) "op_list_gen"
["id_terminal"]=> string(0) ""
["marca"]=> string(2) "--"
["tipo"]=> string(2) "--"
["lyr_content"]=> string(14) "aawaw"
}
How can I remove the values "--" and empty values from the array?
I have tried using a foreach and removing the elements found with unset but it´s not working.
foreach ($array as $key => $arra) {
if(array_key_exists('--', $array)){
unset($arra[$key]);
}
}