php - Column in table not being filled -


this driving me crazy. table renders correctly in column headers correct , first column correct second column skipped , data should there in 3rd column , 3rd in 4th column etc. when @ page source looks correct. when @ "elements" in chrome's developers tools there . here code:

echo '<table id="bordered">';                 echo '<thead>';                     echo '<tr>';                         echo '<th></th>';                         foreach($products $product){                             /*@var $product products */                             echo '<th>',$product->getproductname(),'</th>';                         }                     echo '</tr>';                 echo '</thead>';                 echo '<tbody>';                     foreach($customers $cust){                         echo '<tr>';                             echo '<td>',$cust->getcustomername(),'<td>';                             $prod = forecastdisplay_db::getproductsquantityforcustomer($cust, $products);                             $i=0;                             foreach($prod $quantity){                                 $i++;                                 if($i == 1){                                     echo '<td>first run</td>';                                 }else{                                     echo '<td>', $quantity['id'],'  ',$quantity['quantity'],'</td>';                                 }                             }                         echo '</tr>';                     }                 echo '</tbody>';             echo '</table>'; 

i added 'first run' make sure there wasn't null in first positions of array's there isn't. have idea why column being skipped?

you did not closed td tag correctly.

echo '<td>',$cust->getcustomername(),'<td>'; 

should be

echo '<td>',$cust->getcustomername(),'</td>'; 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

html - Repeat image to extend header to fill screen -

javascript - Backbone.js getting target attribute -