I have this for loop in php:
for ($i=0; $i <= 10; $i++) {
if (file_exists('./img/'.$i.'.jpg')) {
echo 'FILE: '.$i.'.jpg EXISTS!';
} else {
echo 'FILE: '.$i.'.jpg NOT EXISTS!';
}
}
I put in folder img only 1.jpg and 3.jpg so i need to get only for 1.jpg and 3.jpg file exists but i im getting for all files that does not exists or one file exists and all others does not exists...why is this function not returning correctly results?