i have the following function
unction pic_array($nav_file){
global $image_extension, $thumbs_prefix, $create_thumbs
if ( $dh = opendir($nav_file) )
{
while ( false !== ( $file = readdir($dh) ) )
{ if (strpos($file, "$image_extension") && (strpos($file, "$thumbs_prefix"))===false ) {$catch[]=$file;}
elseif(!$create_thumbs && strpos($file, "$image_extension") && !(strpos($file, "$thumbs_prefix")===false)) {$catch_thumbs[]=$file;} }
}
rewinddir($dh);
closedir($dh);
if(!empty($catch)) {natcasesort($catch);
$catch=array_values($catch);}
if(!empty($catch_thumbs)) {natcasesort($catch_thumbs);
$catch_thumbs=array_values($catch_thumbs);}
}
is it possible to use return for the two arrays created there, $catch[] and $catch_thumbs[]
making them global isn't acceptable at the moment but i'm thinking about it