Delete file in FTP via PHP

I hated the days of old when i use to just leave old unused files that had been uploaded lying around the FTP. This really nice bit of code will allow you to delete a file from your FTP. I use it along side deleting the records from the database.

[php]
$ftp_con = ftp_connect(‘ftp.hostname.com’);
ftp_login($ftp_con,’username’,’password’);
ftp_delete($ftp_con,’/path/to/file.extension’);
ftp_close($ftp_con);
[/php]