So I have this array
$employee_salary = array("Peter"=>35000, "Ben"=>25000, "Joe"=>48000);
and I need to sort the array : 1) by value, ascending order 2) by key, ascending order.
I am not allowed to use the asort and ksort functions, so I have no idea how else to do it. Any ideas please? Thank you!
¿Can't you use any php sorting methods, like usort() or asort()?
If yes: https://joshtronic.com/2013/09/23/sorting-associative-array-specific-key/
If no: yes, you must do it manually I guess, with array_walk() or something like this.