title: Sort array with strings with leading numeric expressions of parent-child relationships
body: <p>I have a flat array containing numeric hierarchical prefixes before textual strings.  I need to naturally sort the strings so that each &quot;section&quot; and &quot;subsection&quot; is logically ordered.</p>
  <pre><code>$array = [
      '9.8. Session',
      '9.5. Date &amp; Time',
      '2. Two',
      '9. Built-in Functions',
      '9.10. Other',
      '3. Three',
      '9.1. String',
      '9.9. Directory',
      '1. One',
      '9.2. Arithmetic',
      '9.7. Database',
      '9.3. Variable',
      '9.6. Object',
      '9.4. Array',
  ];
  </code></pre>
  <p>I've tried to sort with <code>sort($array, SORT_NUMERIC)</code> and <code>sort($array, SORT_STRING)</code> but I'm not able to get the desired result. Specifically, it is imperative that <code>9.</code> (parent section) comes before <code>9.1.</code> (child section) and that <code>9.10.</code> comes after <code>9.2.</code>.</p>
  <p>Desired result:</p>
  <pre><code>[
      '1. One',
      '2. Two',
      '3. Three',
      '9. Built-in Functions',
      '9.1. String',
      '9.2. Arithmetic',
      '9.3. Variable',
      '9.4. Array',
      '9.5. Date &amp; Time',
      '9.6. Object',
      '9.7. Database',
      '9.8. Session',
      '9.9. Directory',
      '9.10. Other'
  ]
  </code></pre>