Show What You Know Problem


After an hour or so of copying other people's code and changing it slightly I still get an error:
Remember to print out the name of the lucky winner!
Here's what I put together:

    // Create an array and push on the names
    // of your closest family and friends
    $friends = array();
    array_push ($friends, "k");
    array_push ($friends, "i");
    array_push ($friends, "p");
    array_push ($friends, "Q");
    // Sort the list
    count(0, 3);
    // Randomly select a winner!
    // Print the winner's name in ALL CAPS
    print strtoupper($friends{rand(0,3)});

It seems to work on the console. Any help would be appreciated.


Hi @d123659,

You have to wait for some string to appear in the console before hitting Save & Submit Code. Sometimes it may function sporadically, so please try two or three times again. It worked for me on the second try.

Hope it helps! :slightly_smiling: