I have the following code:
$local_image_name = $_FILES['file']['name'];
// Some code here to get a number
$image_name = $row['id'].$image_ext;
I have $row['id'] set already (it will return a number). But how do I get the $image_ext (extension of the image eg: .gif, .jpg, etc.)?
I don't want to use $_FILES['file']['type'] because then I would have to set all the mime types with a extension.
Eg:
text/html would have the extension of .html, etc.
Thanks.