php随机图片显示代码,如下:
<?php
/**
* 随机显示几张图片
* by www.jb200.com
*/
$resim1="<img src=1.gif alt=Resim_1>";
$resim2="<img src=2.gif alt=Resim_2>";
$resim3="<img src=3.gif alt=Resim_3>";
$resim4="<img src=4.gif alt=Resim_4>";
$resim=array($resim1,$resim2,$resim3,$resim4);
shuffle ($resim);
echo "<table width="445" height="245" border="1" bordercolor="black">
  <tr>
    <td>"; echo $resim[0]; "</td>
    <td>"; echo $resim[1];"</td>
  </tr>
  <tr>
    <td>"; echo $resim[2];"</td>
    <td>"; echo $resim[3];"</td>
  </tr>
</table>
";
?>
猜你喜欢: