I have a HTML file like with a table like this:
<tr valign="top" class="dselbkg" onMouseOver="this.className='selbkg'" onMouseOut="this.className='dselbkg'" >
<td height="20" align="center">1</td>
<td height="20"><div align="center">16-12-2014</div></td>
<td ><div align="center">1ST<br>
(10:0 AM - 1:0 PM)</div></td>
<td ><div align="center">BE2105 </div></td>
<td >PROGRAMMING IN C</td>
</tr>
<tr valign="top" class="dselbkg" onMouseOver="this.className='selbkg'" onMouseOut="this.className='dselbkg'" >
<td height="20" align="center">2</td>
<td height="20"><div align="center">18-12-2014</div></td>
<td ><div align="center">1ST<br>
(10:0 AM - 1:0 PM)</div></td>
<td ><div align="center">BS1101 </div></td>
<td >MATHEMATICS - I</td>
</tr>
<tr valign="top" class="dselbkg" onMouseOver="this.className='selbkg'" onMouseOut="this.className='dselbkg'" >
<td height="20" align="center">3</td>
<td height="20"><div align="center">20-12-2014</div></td>
<td ><div align="center">1ST<br>
(10:0 AM - 1:0 PM)</div></td>
<td ><div align="center">HM3101 </div></td>
<td >COMMUNICATIVE ENGLISH</td>
</tr>
I need to get each <td> into a separate element of an array based on the class id.
I am using PHPQuery. I tried
$table = $all['tr.dselbkg'];
$columns = $table['td'];
But what it does is puts all the columns as a single string. So $columns[0] prints out all the columns while $columns[1] is blank.
How can I take individual <td> as a single element in an array?