Array Functions II (7/8): What am i doing wrong?


#1

I think the code is correct but it doesnt work and i have no idea what i'm doing wrong.
Please help me and explain to me what i'm doing wrong.



<?php
// Create an array with several elements in it,
// then sort it and print the joined elements to the screen
$the_array = array(10, 30, 20, 40);
sort($the_array);
print join (',' $the_array);

?>

</p>
<p>
<?php
// Reverse sort your array and print the joined elements to the screen
rsort($the_array);
print join(',' $the_array);
?>
</p>


#2

You have to separate the arguments being passed to the join function with a comma
here

and here


#3

USE THIS

<?php
// Create an array with several elements in it,
// then sort it and print the joined elements to the screen
$the_array =array(9, 5, 6,);
sort($the_array);
print join("," ,$the_array);
?>



<?php
// Reverse sort your array and print the joined elements to the screen
$e_array =array(1, 4, 8);
rsort($e_array);
print join(",",$e_array);

?>