$dir = opendir("C:/xampp/htdocs/xml");
//List files in images directory
while (($file = readdir($dir)) !== false)
{
$last4 = substr($file, -4);
if ($last4 == ".xml")
{
$files[] = $file;
}
}
closedir($dir);
printf ('<select>');
foreach($files as $let => $val){
printf ('<option value="'.$let.'">'.$val.'</option>');
}
printf ('</select>');
?>
saving selected array value to a variable
Page 1 of 11 Replies - 353 Views - Last Post: 24 January 2013 - 07:45 PM
#1
saving selected array value to a variable
Posted 22 January 2013 - 11:22 AM
i have created an array to save the selected files in my folder and display these value in a dropdown box but i want to save the selected file which i can call later to view in a table. here the code i got so far to put the file into a dropdown box
Replies To: saving selected array value to a variable
#2
Re: saving selected array value to a variable
Posted 24 January 2013 - 07:45 PM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|