PHP has a built in mime_content_type that returns a MIME type (ex: image/jpeg) for a file and extension input (ex: image.jpg). I've looked for a function that goes from the MIME type to the extension, but I don't think it exists.
Does it? If not, is there an easy way to go from "image/jpeg" to ".jpg" or "image/png" to ".png", or something to that effect?
Thanks!