title: How to convert a string to Floating point number and then sort the numbers in ascending order in a multidimensional array in PHP?
body: <p>I have an array of strings like: </p>
  
  <pre><code>$array = array(
      array('km' =&gt; '25 Km', 'name' =&gt; 'B'),
      array('km' =&gt; '1.2 Km', 'name' =&gt; 'A'),
      array('km' =&gt; '7.7 Km', 'name' =&gt; 'Q'),
      array('km' =&gt; '107 Km', 'name' =&gt; 'M'),
      array('km' =&gt; '0.1 Km', 'name' =&gt; 'R'),
      array('km' =&gt; '20 Km', 'name' =&gt; 'J'),
      array('km' =&gt; '20.3 Km', 'name' =&gt; 'HH'))
  </code></pre>
  
  <p>How can I convert key <code>km</code> into floating point numbers then sort <code>$array</code> in an ascending number based on the KEY <code>km</code>?</p>