以下の表に、各質問の各画像を示します。
<table id="tableqanda" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th width="5%" class="questionno">Question No.</th>
<th width="11%" class="image">Image</th>
</tr>
</thead>
</table>
<div id="tableqanda_onthefly_container">
<table id="tableqanda_onthefly" cellpadding="0" cellspacing="0">
<tbody>
<?php
foreach ($arrQuestionId as $key=>$question) {
echo '<tr class="tableqandarow">'.PHP_EOL
echo '<td width="5%" class="questionno">'.htmlspecialchars($arrQuestionNo[$key]).'</td>' . PHP_EOL;
echo '<td width="11%" class="imagetd">';
if (empty($arrImageFile[$key])) {
echo ' ';
} else {
echo '<ul class="qandaul"><li>';
echo implode("</li>\n<li>", array_map(function($imgitem){
return htmlspecialchars($imgitem);
}, $arrImageFile[$key]));
echo '</li></ul>';
}
echo '</td>';
echo '</tr>'.PHP_EOL;
}
?>
</tbody>
</table>
</div>
現時点では、画像ファイル名を箇条書きリストにリストしているだけです。しかし、私がやりたいのは、各ファイルをハイパーリンクとして設定し、ユーザーが画像リンクをクリックすると、その画像が別のページに表示され(別のウィンドウが開きます)、画像自体が表示されるようにすることです。
私の質問は、これをどのように行うことができるかということです。次の手順は何をする必要がありますか?誰かがそれを段階的にコーディングする方法を教えてくれれば、私はそれをオーディオやビデオにも使用できます。
ありがとう