// Date values foreach ($formData As $input => $val) if (in_array($input, [#TCDATEINPUTNAME])) if (empty($val)) unset($formData[$input]);
info at phpclasses dot org