Sort check
Solution
....- Write a function
isSorted($numbers)that checks whether the array$numbersis sorted (return true;) or not (return false;) - Make a (two-dimensional) array
$rows, each element of which is an array of numbers- First rox =
[3, 7, 10, 19, 25]; - Second row =
[3, 7, 30, 19, 25]; - Last row =
[3, 7, 10, 19, 17];
- First rox =
- Call the function
isSorted()on these number arrays, and give some feedback to the user in the following form- 3, 7, 10, 19, 25 => sorted
- 3, 7, 30, 19, 25 => NOT sorted
- 3, 7, 10, 19, 17 => NOT sorted
Tip
Use the PHP functionimplode() to convert an array (of numbers) into a string (with the numbers
separated by commas)