Uitslagen

 

{runphp} function array_csort() { //coded by Ichier2003 $args = func_get_args(); $marray = array_shift($args); $msortline = “return(array_multisort("; foreach ($args as $arg) { $i++; if (is_string($arg)) { foreach ($marray as $row) { $sortarr[$i][] = $row[$arg]; } } else { $sortarr[$i] = $arg; } $msortline .= "\$sortarr[".$i."],"; } $msortline .= "\$marray));"; eval($msortline); return $marray; } # If you want to list the files # in a directory sorted by # date then you can use # the code below (probably could # be more efficient – but it works!) # $dir_name="../docs"; $dir = opendir($dir_name); $basename = basename($dir_name); $fileArr = array(); while ($file_name = readdir($dir)) { if (($file_name !=".") && ($file_name != "..")) { #Get file modification date… # $fName = "$dir_name/$file_name"; $fTime = filemtime($fName); $fileArr[$file_name] = $fTime; } } # Use arsort to get most recent first # and asort to get oldest first arsort($fileArr); $numberOfFiles = sizeOf($fileArr); for($t=0;$t alle informatie"; for ($i=0;$i"; {/runphp}</p>"</p>”