What I would like to do is get the file extension from a file that was just uploaded to put as a field in my database. I've tried the below code but thats dependent on how long the filename is. I would like it to automatically get the extension without knowing how long the file is. Has anyone done this or know of an answer. TIA!
$extension = $basefilename;
$extension = $extension[extension];
$extension = $basefilename;
$extension = $extension[extension];