So in PHP, I am checking a file extension against multiple types to get the general type of file
so here is what I have for images alone:
if ( $ext == "bmp" || $ext == "jpg" || $ext == "png" || $ext == "psd" || $ext =="psp" || $ext == "thm" || $ext == "tif" || $ext == "ai" || $ext == "drw" || $ext == "eps" || $ext == "ps" || $ext == "svg" || $ext == "3dm" || $ext == "dwg" || $ext == "dxf" || $ext == "pln" )
I know that is crazy unefficient, considering the number of if-elses I'll also need to use. Is there another way of doing this to check files, or maybe a better, premade function (like apaches mime_Magic)? thanks for the help!