function ikontrol($val){ $dizi = array(".jpg","jpeg",".png",".gif"); if(!in_array(substr($val, -4), $dizi)){ return 0; } return 1; }