This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Functions, Part I Forum

View Course » View Exercise

1557 points
55afc4299113cbb4b900022b_774338531
Submitted by
Popcorn!
over 3 years ago

Code works, doesn't pass!

<html>
    <p>
    <?php
    // Create an array with several elements in it,
    // then sort it and print the joined elements to the screen
    $theArray = array("Hello", "Nyan", "Psych ");
    ?>
    </p>
    <p>
    <?php
    // Reverse sort your array and print the joined elements to the screen
    sort($theArray);
    print join(", ", $theArray);
    rsort($theArray);
    print join(", ", $theArray);
    ?>
    </p>
</html>

Why won't this work?!


2 votes

permalink

Wait, never mind. I see what I did wrong.
I put the code in the wrong place!

1557 points
55afc4299113cbb4b900022b_774338531
Submitted by
Popcorn!
over 3 years ago