Manipulating multidimensional array in PHP?
<pre><code>array(2) {
  [0]=&gt;
  object(stdClass)#144 (2) {
    ["id"]=&gt;
    string(1) "2"
    ["name"]=&gt;
    string(5) "name1"
  }
  [1]=&gt;
  object(stdClass)#145 (2) {
    ["id"]=&gt;
    string(1) "4"
    ["name"]=&gt;
    string(5) "name2"
  }
}
</code></pre>

<p>I want to add key and value (for example [distance] = 100;) to the objects in the array. After this I want to sort on the distance values. How can I achieve this?</p>
