Show what you know


#1

Please help, what I am doing wrong with my code below?
Regards,
I

<html>
    <p>
	<?php
	// Create an array and push on the names
    // of your closest family and friends
   $myfamily = array();
   array_push($myfamily, "Papa");
   array_push($myfamily, "Mama");
   array_push($myfamily, "Lisa");
   array_push($myfamily, "Sergio");
   array_push($myfamily, "Eloy");
	// Sort the list
   sort($myfamily);
	// Randomly select a winner!
    $win = $myfamily[rand(0, count($myfamily)-1)];  
	// Print the winner's name in ALL CAPS
   print strtoupper($win);
	</p>
</html>


#2

you didn't close the php tag


#3

thank you so much! what a fault :smiley:


#4

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