Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php order filename

<?php
    $a=array();
    if ($handle = opendir('.')) {
    while (false !== ($file = readdir($handle))) {
    if(preg_match("/.doc$/", $file)) 
    $a[]=$file;
    }

    closedir($handle);

    }
    sort($a);
    foreach($a as $i){
    echo $i;
    }
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #order #filename
ADD COMMENT
Topic
Name
1+1 =