Advertisement
arijulianto

PHP Columnar Data (2 Kolom)

Apr 15th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. <table border="1">
  2. <?php
  3. include "mysqli_connect.php";
  4. $i=1;
  5. $sql = $mysqli->query("SELECT * from tabel where blablabla");
  6. while($data = mysqli_fetch_array($sql)){
  7.     if($i==1) echo "<tr>\n";
  8.     echo "  <td>$data[nama_produk]</td>\n";
  9.     if($i%2==0) echo "</tr>\n<tr>\n";
  10. $i++;
  11. }
  12. ?>
  13. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement