Posted By

onefastsnail on 05/24/12


Tagged


Versions (?)

random images


 / Published in: PHP
 

  1. for ($i=0; $i < 20; $i++) {
  2.  
  3. if ($i % 2 == 1) {
  4.  
  5. echo "<img src='http://placedog.com/300/";
  6. echo rand(200,400);
  7. echo "' alt=''>";
  8.  
  9. } else {
  10.  
  11. echo "<img src='http://placekitten.com/300/";
  12. echo rand(200,400);
  13. echo "' alt=''>";
  14.  
  15. }
  16.  
  17.  
  18.  
  19. }

Report this snippet  

You need to login to post a comment.