[PHP][MYSQL] 使用 PDO 在 INSERT 或 UPDATE 時,如何在沒有值時寫入 NULL?

有值就寫值,沒值就寫NULL

$sth->execute(array(
    'tel' => ($tel?$tel:null)
));