I can't figure out how can I return that random friend!


#1


https://www.codecademy.com/courses/web-beginner-en-7I7Xm/0/8?curriculum_id=5124ef4c78d510dd89003eb8#


Oops, try again. Make sure the name you print out is in ALL CAPS!


<html>
    <p>
	<?php
	// Create an array and push on the names
    // of your closest family and friends
    $family_friends = array();
    array_push($family_friends,"Vasile"); 
    array_push($family_friends,"Leana");
    array_push($family_friends,"Alexandru");
    array_push($family_friends,"Florin");
    array_push($family_friends,"Ionut");
	// Sort the list
    sort($family_friends);
	// Randomly select a winner!
    $winner = rand(0,count($family_friends));
	// Print the winner's name in ALL CAPS
	print strtoupper($winner);
	?>
	</p>
</html>


#2

I just figured out after minutes of pain...
I couldn't resist and I pressed the hint button :smiley:


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.