From http://stackoverflow.com/questions/173868/how-to-extract-a-file-extension-in-php
// How to extract a file extension in PHP? $ext = pathinfo($filename, PATHINFO_EXTENSION);