1. echo'<table border="1" width="700">';
  2.  
  3. for( $i = $start; $i < $start+5; $i++ )
  4. {
  5.     echo'<tr>';
  6.     for( $j = 0; $j < $col; $j++ ) {
  7.         if( ! empty( $array[$j] ) ) {
  8.             echo '<td>'.$array[$j]['item_id'].'</td>';
  9.         }
  10.     }
  11.     echo'</tr>';
  12. }
  13.  
  14. echo'</table>';