If you've ever built a proper website......you know from scratch without just using something out the box.....ohhhhh get me! - right that has upset all the WordPress, Drupal and Joomla fanatics in one foul sweep....sorry where was I - ah yes, building a website and feeling smug...if you've ever done this then you'll have probably built a site with a header navigation that then shows the sub-navigation in left side of your page (or the right if you've got a somewhat questionable sense of design) with all the sub-page of that section that expands as you get deeper into the site.
If you've ever built a website that allows your users upload files you may have discovered the frustrations that certain characters cause problems when you try to provide a download link. The solution to this (and in fact to the risk of cross-site scripting issues that could be introduced) is to transliterate the filenames after the upload to make sure they are websafe.
There are quite a few articles on the web for how to move all files from one directory to another but not many decent examples of how to do it for selected file types, in fact quite a lot of people don't seem to know that you can easily look at the file type of files in PHP so i've put together an easy example of how to do this: