Array Sorting in PHP. I need to write my own asort() and ksort() functions? : <p>So I have this array</p>

<pre><code>$employee_salary = array("Peter"=&gt;35000, "Ben"=&gt;25000, "Joe"=&gt;48000);
</code></pre>

<p>and I need to sort the array : 1) by value, ascending order 2) by key, ascending order. </p>

<p>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!</p>
