Lesson 7 Some one Pl help to fix the error . Console printing the right out put but the Editor is showing the ERROR


#1

The code is as under.

Create an array with several elements in it,
// then sort it and print the joined elements to the screen
$the_array = array(12, 5, 25, 58, 2, 89);
sort($the_array);
print join(",", $the_array);
?>



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


#2

print join(":",$the_array); // to join the array use , instead of :


#3

$the_array=array(",",1,2,3,4,5,6,7,8,9,",")


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.