check for image file in php
by Ramya[ Edit ] 2012-09-29 14:30:46
check for image file in php:
Function to check if any image exists in the folder,
function checkImage($getImg){
if(preg_match("/(\.gif|\.jpg|\.png)$/", $getImg)) {
return "Image";
}else{
return "No";
}
}