bit new to PHP I've been playing around a bit with it but I am unsure how to assign the string value of an array to a variable and print it. Currently it is only displaying the array number rather than it's data.
Any help/explanation appreciated
My current code is:
<?php
$family_friends = array();
array_push($family_friends, "James ");
array_push($family_friends, "Patrick");
array_push($family_friends, "Kevin");
array_push($family_friends, "Miles");
array_push($family_friends, "Reuben");
sort($family_friends);
// Randomly select a winner!
$winner = array_rand($family_friends, 1);
// Print the winner's name in ALL CAPS
strtoupper($winner);
echo " ". "Congratulations"." ".($winner) . "!";
?>