continue statement
Posted: Tue Jul 01, 2003 1:31 pm
Hello,
Im trying to understand the correct usage of the continue statement...im having a bit of a hard time comprehending the manual's examples
i have the following code
[syntax=php]for($i=0; $i<5 ; $i++){
if($imagetype != 'jpeg')
continue;
if($imagesize>max_size)
continue
savefile($image);
}[/syntax]
Now what i am attempting is that if the imagetype is not jpeg or if the imagesize is over the max skip this file and go to the next file to validate other wise it will savefile($image);
however i dont seem to be getting the desired result
can someone explain what im suppose to do with the continue?
Kendall
Im trying to understand the correct usage of the continue statement...im having a bit of a hard time comprehending the manual's examples
i have the following code
[syntax=php]for($i=0; $i<5 ; $i++){
if($imagetype != 'jpeg')
continue;
if($imagesize>max_size)
continue
savefile($image);
}[/syntax]
Now what i am attempting is that if the imagetype is not jpeg or if the imagesize is over the max skip this file and go to the next file to validate other wise it will savefile($image);
however i dont seem to be getting the desired result
can someone explain what im suppose to do with the continue?
Kendall