$ha=opendir($LOCAL_SERVER_DIR);
while (($filelocal = readdir($ha))!==false)
{
if(!is_dir($filelocal))
{
$fa[]=$filelocal;
}
sort($fa);
}
for($i=0;$i<sizeOf($fa);$i++)
{
$pdfname=substr($fa[$i], 0, strpos($fa[$i], '.pdf'));
exec("convert -scale 1500x1000".$fa[$i]."D:/Images/ExtractFromFTP/img%d_".$pdfname.".png");
}
In my code i am extracting multiple PDF'S, storing all extracted images into D:/Images/ExtractFromFTP/
at following path. so it is very hard to sort images as per it's pdf name. that's why i want to store extracted images into different different folders as per their pdf name to that folder(So it means i need to create folders run time) but i couldn't find the way of arrange order?