This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Rochelle Wilson
over 8 years

Why won't the winner name print out?!

Answer 55b00f14e39efe36d10001a8

2 votes

Permalink

I found a solution and the code below worked!!

$family = array(); array_push($family, “Craig”); array_push($family, “Scott”); array_push($family, “Zara”); array_push($family, “Rochelle”); // Sort the list sort($family); // Randomly select a winner! $count = count($family) -1; $random = rand(0, $count); $winner = $family[$random]; // Print the winner’s name in ALL CAPS print strtoupper($winner);

points
Submitted by Rochelle Wilson
over 8 years

1 comments

Ruben van Houten over 8 years

I tried your solution and it worked. I am surprised by the additional required functions so I have to practise them a bit more. Thank you!

Answer 55ba0e709113cb76db000140

0 votes

Permalink

points
Submitted by Ben
over 8 years