Welcome Guest, Not a member yet? Register   Sign In
Directory Helper Question
#4

(This post was last modified: 02-04-2016, 09:56 AM by keulu.)

but if you have images in your subfolder, you can use a recursive method.

a recursive methods is a method who call itself


PHP Code:
$images_directory directory_map('./images/catalog/'FALSETRUE);
$images = array();

function 
getImages($images_directory){
    foreach (
$images_directory as $image_directory){
        if (
is_array($image_directory){
           
getImages($image_directory);
        }else{
            
$images[] = $image_directory;
        }
    }
}


getImages($images_directory);
var_dump($images); 


i'm not sure this methods work like that. i writted it from scratch. but this is how to do a recursive method.
Reply


Messages In This Thread
Directory Helper Question - by wolfgang1983 - 02-04-2016, 03:28 AM
RE: Directory Helper Question - by InsiteFX - 02-04-2016, 03:34 AM
RE: Directory Helper Question - by wolfgang1983 - 02-04-2016, 10:33 PM
RE: Directory Helper Question - by keulu - 02-04-2016, 06:24 AM
RE: Directory Helper Question - by keulu - 02-04-2016, 09:42 AM
RE: Directory Helper Question - by wolfgang1983 - 02-04-2016, 09:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB