title: preg_match_all() how to display results? array to string conversion error
body: <p>I've tried learning this but for whatever reason it just does not work.</p>
  
  <p>I have the following:</p>
  
  <p><li><b>
      text here:
      </b>
      5.3 x 6.0 x 40 metres
      </li></p>
  
  <p>which in code is:</p>
  
  <pre><code>&lt;li&gt;&lt;b&gt;
  text here:
  &lt;/b&gt;
  5.3 x 6.0 x 40 metres 
  &lt;/li&gt;
  </code></pre>
  
  <p>This HTML is in a variable let's call it $dimensions
  I'm trying to extract the <code>5.3 x 6.0 x 40 metres</code> with a preg_match_all, ideally extracting the dimensions and also the measurement but I'm having trouble echoing the results. It says array conversion to string error each time despite the size of matches being 5. Any Ideas what's going on? </p>
  
  <pre><code>preg_match_all('/\&lt;li\&gt;([0-9]*\.*[0-9]*)x([0-9]*\.*[0-9]*)x([0-9]*\.*[0-9]*)
               \s*([a-zA-Z]*)\&lt;\/li\&gt;/',$dimensions,$matches,PREG_PATTERN_ORDER);
           echo sizeof($matches);
           echo($matches[0]);
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>As suggested by an answer below: someone said use var_dump($matches) to see what the array contains...
  Turns out I have 4 empty arrays, which brings up the next question. what is wrong with my preg_match_all?</p>
  
  <pre><code>array (size=5)
      0 =&gt; 
         array (size=0)
             empty
      1 =&gt; 
         array (size=0)
             empty
      2 =&gt; 
         array (size=0)
             empty
      3 =&gt; 
         array (size=0)
             empty
      4 =&gt; 
         array (size=0)
             empty
  </code></pre>