Question: PHP CODE QUESTION Thank You Your task is to complete the PHP code below. It should sort the numbers both from greatest to lowest as
PHP CODE QUESTION
Thank You
Your task is to complete the PHP code below. It should sort the numbers both from greatest to lowest as well as lowest to greatest, then print them as shown in the example output. The numbers are sent to the program as a string in which the numbers are separated by comma (for example "4,2,5,2"). The explode function is used to split them into an array. Using PHP's standard sort function isn't allowed. The sorting has to be done using for-statement. The in-complete code: Example output: Order in the beginning: 8,65,5,32,76,8,43,32,47,9,34,432,8,9,54,2,54,67,7,332,76,8 From greatest to lowest: 432,332,76,76,67,65,54,54,47,43,34,32,32,9,9,8,8,8,8,7,5,2 From lowest to greatest: 2,5,7,8,8,8,8,9,9,32,32,34,43,47,54,54, 65, 67,76,76,332,432
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
