Darn! I always get this error.
This is the code.
$b is an array of numbers.
I am trying to make a multiple image uploader, but it always echoes
$d no matter i use $d == 'jpg' or $d !== 'jpg'
Can someone help me? Php noob here.
BTW, here's the form.
Thanks so much. :)
Code
Strict Standards: Only variables should be passed by reference in C:\XamPP\htdocs\workspace\dawnsite\test.php on line 16This is the code.
PHP Code
<?php
foreach ($b as $c) {
//upload multiple images
$d = strtolower(end(explode('.', $_FILES["file"]["name"][$c]))); //the 16th line
$d = $d;
if (($d !== 'jpg')
OR ($d !== 'jpeg')
OR ($d !== 'gif')
OR ($d !== 'bmp')
OR ($d !== 'png')) {
echo $d;
}
}
$b is an array of numbers.
PHP Code
<?php
$a = count($_FILES['file']['name'])-1;
$b = range(0,$a);
I am trying to make a multiple image uploader, but it always echoes
$d no matter i use $d == 'jpg' or $d !== 'jpg'
Can someone help me? Php noob here.
BTW, here's the form.
Code
<form action="" method="post" enctype="multipart/form-data" >
<input name="file[]" type="file" multiple id="file" />
<input class="submitimg" value="Upload" type="submit" name="submitimage" />
</form>Thanks so much. :)


![[Image: 8Yoto.png]](https://i.imgur.com/8Yoto.png)
