Random Images with PHP





0
Date Submitted Sat. Jul. 24th, 2010 7:40 AM
Revision 1 of 1
Helper jackoder
Tags Image | PHP | Random
Comments 0 comments
Hi coders,

Here's a code block that you can use it in your projects easily. It provides you to show random images.

I hope that you'll like it. I'll also use it in 2 spieler spiele and gute spiele web sites. You can follow them from it.

Best wishes.

<?php

$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>

"
;


?>
 

Jack ODERMAN

Comments

There are currently no comments for this snippet.

Voting

Votes Up


Votes Down