note 29630 modified in function.glob by aidan

From: Date: Thu, 09 Dec 2004 03:43:50 +0000
Subject: note 29630 modified in function.glob by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81564@lists.php.net to get a copy of this message
If you don't have PHP >= 4.3 available and don't want to hassle with PHP (:-) do something like this on GNU/Linux: <?php foreach (explode("\n",find -type d -maxdepth 1 ! -name ".*" -printf "%f\n" ) as $dirname) { print $dirname; } ?> With the "find" you can "glob" whatever you like. --was-- If you don't have PHP >= 4.3 available and don't want to hassle with PHP (:-) do something like this on GNU/Linux: foreach (explode("\n",find -type d -maxdepth 1 ! -name ".*" -printf "%f\n" ) as $dirname) { print $dirname; } With the "find" you can "glob" whatever you like. http://php.net/manual/en/function.glob.php

« previous php.notes (#81564) next »