Functions part 1 number 7. Arrays part 2 I don't understand the instructions


#1

Instructions
On line 6, use array() to create an array with several elements and store it in $the_array.
Next, sort() the array.
Then, print out join("," $the_array).
On line 12, rsort() the array.
Finally, join() and print the reverse-sorted array to the screen.

This is my code so far


<?php
$array_push = array();
array_push($array_push, "Apple");
array_push($array_push, "Pear" );
array_push($array_push, "Orange");
array_push($array_push, "Strawberries");
array_push($array_push, "Grape");
array_push($array_push, "Banana");
array_push($array_push, "Cherry");
print join(" , ", $array_push);

?>
</p>
<p>
<?php
$array_push = arraypush(Apple,Pear  

?>
</p>


#2

@martina98

Your code:

The instructions:

Store your array inside a variable called $the_array not $array_push.

Remember an array is like this:

array("element", "another element");

Remove all this code:


#3

Ok Thank you miniapple8888