7. Array Function II


#1

Its not printing out the reverse format, Please guide..

 $new_array = array(5, 7, 99, 56, 89, 45, 44);
 rsort($the_array);
 print join(",", $new_array);

Though its passing me, Still I just want to know..


#2

is one array

is the second array
you are running operations on two different arrays.


#3

Hello!I stuck in 7.lesson,2.part
<?php
// Create an array with several elements in it,
// then sort it and print the joined elements to the screen
$the_array = array(7,56,89,42);
sort($the_array);
print join(", " , $the_array);

?>
</p>
<p>
<?php
// Reverse sort your array and print the joined elements to the screen
$the_array = array(7,56,89,42);
rsort($the_array);
print join(":", $the_array);

?>


#4

Hi here

$the_array = array(7,56,89,42);
rsort($the_array);
print join(":", $the_array);

Inside your join() you put : in " " instead of , like that

join("," , $the_array);

#5

thanks!now its working!