Using the unlink() Function
<?php $files = glob("/tmp/*.tmp"); foreach($files as $val) { unlink($val); } ?>