我需要幫助才能將我的所有圖片以內聯方式顯示在我的文件夾中,而不是相互之間。我該如何讓PHP以內聯方式顯示圖片
<?php
$files = glob("bilder/*.*");
for ($i=1; $i<count($files); $i++)
{
$image = $files[$i];
$supported_file = array(
'gif',
'jpg',
'jpeg',
'png'
);
$ext = strtolower(pathinfo($image, PATHINFO_EXTENSION));
if (in_array($ext, $supported_file)) {
echo '<img src="'.$image .'" width="400" height="500" />'."<br /><br />";
} else {
continue;
}
}
?>
刪除'
'add'style =「display:inline-block;」' –
PHP does not do this。它的所有HTML/CSS – CodeGodie
你爲什麼要在你的HTML中添加'
'標籤? – CodeGodie