Hi. I appreciate what a basic query this is but having searched all relevant queries to this exercise I can't figure out why I'm getting the error message in the title. I'm obviously messing up the syntax for retrieving a value from an array (second to last line), but every correct example of this exercise I've seen appears to use the same syntax.
<html> <p> <?php // Create an array and push on the names // of your closest family and friends $got=array("Lannister", "Stark", "Bolton", "Targaryen", "Tully"); array_push($got, "Baratheon", "Greyjoy"); // Sort the list sort($got); // Randomly select a winner! $winner = rand(0,count($got)-1); // Print the winner's name in ALL CAPS $winningname=$got($winner); print strtoupper($winningname); ?> </p> </html>
Replace this line with your code.