-1
PHP를 사용하여 갤러리에서 이미지를 가져 왔습니다. 하지만 이제는 한 행에 두 개의 이미지 만 표시하려고합니다. 내가 지정한 $content
에 반환하십시오.배열에서 PHP의 한 행에 두 개의 이미지가있는 방법
도와주세요.
function CreateGalleryImages($types) {
$galleryArray = array();
$galleryModel = new GalleryModel();
$galleryArray = ($galleryModel -> getGalleryByTypes($types));
$result = "";
foreach ($galleryArray as $gallery) {
for ($i = 0; $i < 2; $i++){
$result = "<td>"
."<img runat = 'server' src = 'http://localhost/schoolwb/event/$gallery' height=500 width=500 />"
."</td>";
}
$result = "<tr>.$result.</tr>";
}
return "<table class = 'GalleryTable'> . $result . </table>";
}