SKANK!!!!! 5 Posting Pro in Training

sorry i figure it out again. really really easy:

i really need to know. i got this one script that is alphabetally and minimal. which i luv. but i need it to be numerical because well, if ther is more than 9 images it sorts it wrong with abc order!

$path = $_SERVER[DOCUMENT_ROOT] . '/purchase/item/' . $image."/";
 $narray=array();
$dir_handle = @opendir($path) or die("Unable to open $path");
$i=0;
while($file = readdir($dir_handle)){if($file != '.' && $file != '..'){$narray[$i]=$file;$i++;}}
sort($narray[B], SORT_NUMERIC);[/B]//// that is it thanks php cookbook
for($i=0; $i<sizeof($narray); $i++){

echo $narray[$i];//which is the filename

 } closedir($dir_handle);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.