How to delete files matching pattern within a directory in PHP?
<p>I have created a PHP script to generate CSV files. I want to keep only the latest file which the script creates. How can I delete all older <code>*.csv</code> files in a directory using PHP?</p>
