[嗨,我是PHP的新手,正在使用此PHP cURL for Downloading File From Url
我目前正在尝试解决下面的PHP foreach代码,因为我试图回显所有图像,并且可以在PHP中工作,但是在HTML中可以显示一个图像?
PHP
$image = array('<img src="'.$file_path.'" width="250" />');
foreach ($image as $key => $images) {
echo $images;
}
HTML
<form method="post">
<div class="form-group">
<input type="text" name="url[]" /><br />
<input type="text" name="url[]" /><br />
<input type="text" name="url[]" /><br />
<input type="text" name="url[]" /><br />
<input type="text" name="url[]" /><br />
</div>
<br />
<input type="submit" name="download" value="Download" />
<br />
<?php echo $images; ?>
</form>
欢迎堆栈溢出。
尝试一下:PHP: