How to actually convert a regular expression in the given code of the image handler so that when choosing a file with the extension .jPg, .pnG and so on, the function does not stop working and generally accepts the extension of the image without registering?
... if(preg_match('/[.](jpg)|(JPG)$/', $filename)) { $im = imagecreatefromjpeg($path_to_image_directory . $filename); } else if (preg_match('/[.](gif)|(GIF)$/', $filename)) { $im = imagecreatefromgif($path_to_image_directory . $filename); } else if (preg_match('/[.](png)|(PNG)$/', $filename)) { $im = imagecreatefrompng($path_to_image_directory . $filename); } ...
/need to add the letteritotalpreg_match('/[.]jpg$/i', ...)- Mike