title: PHP - rand() - random value from array of names
body: <p>Task description is to use functions: count(), rand(), and strtoupper() to get random name printed out of my PHP array in all caps.
  Code: <a href="http://ideone.com/nwjyoa" rel="nofollow">http://ideone.com/nwjyoa</a></p>
  
  <hr>
  
  <pre><code>&lt;?php
  // Create an array and push on the names
  $friends=array("Mike", "Ondrej", "Honza", "Danca", "Misa", "Verca");
  array_push($friends, "Michal", "Vendulka", "Daniela");
  // Sort the list
  sort($friends);
  // Randomly select a winner!
  $winner = array_rand($friends, 1);
  echo "&lt;p&gt;$winner&lt;/p&gt;";
  // Print the winner's name in ALL CAPS
  ?&gt;
  </code></pre>
  
  <p>I got so far to choosing a random value from the array, but it gives me its number(position), not a name :/<br>
  Could you please point me in the right direction to solving that?</p>