You will have to firstly use the directory functions. And read the files within the directory.
Then using unlink delete the files.
[man]dir[/man] the example should do what you require instead of [man]echo[/man]'ing the file name use [man]unlink[/man]