I tried searching the forums for this topic but i get soooo many unecesary posts so i am posting it anyway...sorry guys
i am using a break/ conitnue statement to get out of an if statement to go back to the begining of a function
Code: Select all
while(false !== ($content = $directory->read())){
if(($content != '..') && ($content != '.')){
if($TYPE){
// get files that match
if($TYPE == 'file' && strstr($content,$MATCH) && !is_dir($path.$content))
$CONTENTS[] = $content;
// get folders that match
if($TYPE == 'folder'){
// check to see if its a directory
if(!is_file($path.$content)){
// if i need to match content
if($MATCH){
if(strstr($content,$MATCH)){
$CONTENTS[] = $content;
continue; // breaking to go back to the top
}
}
$CONTENTS[] = $content;
}
}
}else{
$CONTENTS[]=$content;
}
}Kendall