Advertisement
ujiajah1

function part1

Aug 20th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <html>
  2.     <p>
  3.     <?php
  4.     // Create an array and push on the names
  5.     // of your closest family and friends
  6.     $family = array("agus", "tina", "supri" ,"sena");
  7.     // Sort the list
  8.     array_push($family, "agus", "tina", "supri" ,"sena");
  9. sort ($family);
  10.     // Randomly select a winner!
  11.     $fam = count($family);
  12.     $him = rand(0, $fam -1);
  13.     // Print the winner's name in ALL CAPS
  14.      $winner = $family[$him];
  15.     echo strtoupper($winner);
  16.     ?>
  17.     </p>
  18. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement