Hi all,
first the php code :
<?php
while(list($name, $value) = each($HTTP_POST_VARS))
{
$$name = $value;
}
$myvar = $choix;
$myext = $extent;
$rep=opendir($myvar);
$fichiers="";
while ($nomfichier=readdir($rep)){
if(substr($nomfichier,-3)==$myext) {
$fichiers .= ",".substr($nomfichier, 0);
}
}
echo "listeMP3=".urlencode(substr($fichiers,1));
closedir($rep);
?>
I am passing variables from Flash to PHP and back. The value of $myvar is the path to a folder ("images/folder1/")
PHP is then browsing the folder and sends back to Flash the filenames with the extention $myext (can be .jpg, .gif...).
What I would like to do and don't no how is the following : Depending on the users choice (in The Flash interface), php should not only browse 1 folder, but 2. Like :
$myvar="images/folder1/" and $myvar2="images/folder2/". Now the question : Do I have to build to seperate while loops for each variable or is there a way to build that in the loop I have.
Thank you very much for your help !!!!!!
while loop
Moderator: General Moderators
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany