Guest User

Untitled

a guest
Nov 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. <?php
  2. $bg = array('bg-01.jpg', 'bg-02.jpg', 'bg-03.jpg', 'bg-04.jpg' );
  3. $i = rand(0, count($bg)-1);
  4. $selectedBg = "$bg[$i]";
  5. ?>
  6.  
  7. body{
  8. background: url(images/<?php echo $selectedBg; ?>);
  9. }
Add Comment
Please, Sign In to add comment