I have a small task in php. I have a simple array.
Array
(
[0] => 50
[1] => 100
[2] => 150
)
Is there a php built in function which i can use so that it can return true or false, accordingly if array is already sorted or not, Or any other php script for this, no loops. I know it is easy with loops and conditions.
Here, you can try with this code: