Ok, so i'm doing the multiple file upload thingymabob!
I'm just playing around really...
When i try to check the file type i simply get Array().
[php]
foreach ($_FILES['file']['name'] as $_key => $_value)
{
echo $_value . " was uploaded successfully.<b r />";
echo $_FILES['file']['type'] . " <br />";
}
[/php]
So to traverse through the array i added a foreach:
[php]
foreach ($_FILES['file']['name'] as $_key => $_value)
{
echo $_value . " was uploaded successfully.<b r />";
foreach($_FILES['file']['type'] as $_x => $_y){
echo $_value . " is in $_y format<br />";
}
}
[/php]
But that gives me this:
When i just want:
I'm stumped ...
I'm just playing around really...
When i try to check the file type i simply get Array().
[php]
foreach ($_FILES['file']['name'] as $_key => $_value)
{
echo $_value . " was uploaded successfully.<b r />";
echo $_FILES['file']['type'] . " <br />";
}
[/php]
So to traverse through the array i added a foreach:
[php]
foreach ($_FILES['file']['name'] as $_key => $_value)
{
echo $_value . " was uploaded successfully.<b r />";
foreach($_FILES['file']['type'] as $_x => $_y){
echo $_value . " is in $_y format<br />";
}
}
[/php]
But that gives me this:
Code:
ut_the_folk_down1.gif was uploaded successfully. put_the_folk_down1.gif is in image/gif format put_the_folk_down1.gif is in image/jpeg format natnme.jpg was uploaded successfully. natnme.jpg is in image/gif format natnme.jpg is in image/jpeg format
Code:
ut_the_folk_down1.gif was uploaded successfully. put_the_folk_down1.gif is in image/gif format natnme.jpg was uploaded successfully. natnme.jpg is in image/jpeg format
Comment