Ver originalforeach($_POST as $key => $value){ if(empty(trim($value))) $$key = 1;}print_r(get_defined_vars());