How to parse html table to array with symfony dom crawler
<p>I have html table and I want to make array from that table</p>

<pre><code>$html = '&lt;table&gt;
&lt;tr&gt;
    &lt;td&gt;satu&lt;/td&gt;
    &lt;td&gt;dua&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;tiga&lt;/td&gt;
    &lt;td&gt;empat&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>My array must look like this</p>

<pre><code>array(
   array(
      "satu",
      "dua",
   ),
   array(
     "tiga",
     "empat",
   )
)
</code></pre>

<p>I have tried the below code but could not get the array as I need</p>

<pre><code>$crawler = new Crawler();
$crawler-&gt;addHTMLContent($html);
$row = array();
$tr_elements = $crawler-&gt;filterXPath('//table/tr');
foreach ($tr_elements as $tr) {
 // ???????
}
</code></pre>