title: Simple-html-dom list ordering nested without class
body: <p>i am literally stuck with getting these ul/li elements in one row.
  Only first li has class, others are in another ul but without class or id. i tried multiple searches and loops, but can't get it right.
  Below results returns too many rows where elements don't fit together.</p>
  <p>Can someone help me?</p>
  <p>idealy the result from below example would be:</p>
  <p>'part', 'desc', 'qty'<br/>
  '106128-001','LBL, BLNK,THERMAL PRINT','1'<br/>
  '106128-004','LBL, BLNK THERMAL,RECT 2.40x4','1'<br/></p>
  <p>HTML example</p>
  <pre><code>&lt;div id='tab1' class=&quot;section tab&quot; data-position=&quot;auto&quot; style=&quot;max-height:none;&quot;&gt;
  &lt;ul class=&quot;links&quot;&gt;
              &lt;li id=&quot;innertab1&quot;&gt;&lt;a href=&quot;#combom0&quot; class=&quot;collapsed&quot;&gt;106128-001&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id=&quot;combom0&quot; class=&quot;tab1 cols2 compare&quot;&gt;
              &lt;li style=&quot;border: none;&quot;&gt;
                  &lt;div&gt;
                      &lt;ul&gt;
                          
                          &lt;li&gt;&lt;strong&gt;Description: &lt;/strong&gt;LBL, BLNK,THERMAL PRINT&lt;/li&gt;
                          &lt;li&gt;&lt;strong&gt;Qty: &lt;/strong&gt;1&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/div&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
  &lt;ul class=&quot;links&quot;&gt;
              &lt;li id=&quot;innertab1&quot;&gt;&lt;a href=&quot;#combom1&quot; class=&quot;collapsed&quot;&gt;106128-004&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;ul id=&quot;combom1&quot; class=&quot;tab1 cols2 compare&quot;&gt;
              &lt;li style=&quot;border: none;&quot;&gt;
                  &lt;div&gt;
                      &lt;ul&gt;
                          
                          &lt;li&gt;&lt;strong&gt;Description: &lt;/strong&gt;LBL, BLNK THERMAL,RECT 2.40x4&lt;/li&gt;
                          &lt;li&gt;&lt;strong&gt;Qty: &lt;/strong&gt;1&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/div&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
  </code></pre>
  <p>My poor attempt with trying to count rows:</p>
  <pre><code>$search = $html-&gt;find('div[id=tab1]',0);
  $i=0;
  $alles=array();
  
      foreach ($search-&gt;find('* li') as $test){
      if(!empty($test-&gt;innertext)){
          if($i&gt;3){$i=0;}
          $i++;
          if($i==1){
                  echo $alles_li['part'] = strip_tags($test-&gt;innertext);
          }
          if($i==2){
                  // don't need this, bad stripping
                  strip_tags($test-&gt;innertext);
          }
          if($i==3){
                  $alles_li['desc'] = strip_tags($test-&gt;innertext);
          }
          if($i==4){
              $alles_li['qty'] = strip_tags($test-&gt;innertext);
          }
  
      }
  // if less than 3 elements don't add
  
      if(count($alles_li)==3){    
          
          $alles[]=$alles_li;
  
      }
  }
  </code></pre>