Get all directories in PHP

I think this may be the fastest way to get a list of all the directories in a given folder/directory using PHP. [code lang=”php”]$directories = array_filter(glob(‘*’), ‘is_dir’);[/code] ..and of course you can also add a path to it if you need to: [code lang=”php”]$directories = array_filter(glob($myPath.’*’), ‘is_dir’);[/code]

By Andrew Odendaal, ago

Clear an array in Actionscript 3

I personally really like this way of clearing an array’s elements: Declare your array to use: [code lang=”actionscript”] var myArray:Array=new Array(); [/code] Add elements: [code lang=”actionscript”] for (var i:Number;i

By Andrew Odendaal, ago