Display mysql table using for loop in php
Display mysql table using for loop in php
This tutorial will show you how to display mysql tables using for loop instead of while in php. Very simple script just grab it guys.
//please dont forget to connect to mysql $objDB = mysql_select_db('my_db'); $qry_acct='SELECT * From My_test_table'; $result_acct=mysql_query($qry_acct) or die ('Error Query ['.$qry_acct.']'); $num_acct = mysql_num_rows($result_acct); for($i=0;$i<s $num_acct;$i++) { //My Column is one of the column in my TABLE echo mysql_result($result_acct,$i,'My Column').'<br>'; }
Any doubts feel free to comment. I have not added the entire script because i reckon that you guys are comfortable in using php / mysql.
Display mysql table using for loop in php,Incoming search terms:
- jcarrosel (10)
- display mysql table using php (2)
- dispaly images in a table using php (1)
- mysql loop table (1)
- php connect mysql loop (1)
- php display a table using a loop (1)
- php display column by column using while loop in table (1)
- php for loop to display a table (1)
- PHP Looping Through & Displaying A MySQL Result in muliple table (1)
- php mysql limit columns table loop (1)
- php mysql show table (1)
- show tables by php code for loop (1)
- mysql for loop (1)
- looping through a mysql table in php (1)
- limit display using for loop php (1)
- Display multiple images from Mysql from a column Table in one line (1)
- display mysql result using for loop (1)
- display ten lines using for loop in php (1)
- display using for loop (1)
- how to display a table row in a php for loop (1)
- how to display mysql data using php for loop (1)
- how to display the result of for loop in a table using php (1)
- how to iterate through columns of a mysql table in php (1)
- html tables using a loop with mysql (1)
- using for loop how to display data in table (1)
Oh great tutorial!!! It’s help me a lot.
Kelly Blue
Web Developer, Australia