Display PHP Query Array in the table
Posted
by Jerry
on Stack Overflow
See other posts from Stack Overflow
or by Jerry
Published on 2010-05-20T14:03:11Z
Indexed on
2010/05/20
14:20 UTC
Read the original article
Hit count: 208
Hi all I would like to display my Query from Mysql on the table. However, my data is like this:
Array([0]=>data1, [1]=>data2, [2]=>data3,[3]=>data4,[4]=>pic1,[5]=>pic2,[6]=>pic3,[7]=>pic4);
I want to display my table as
|data1 | data2 |data3 |data4
|pic1 | pic2 |pic3 |pic4
I know how to display the data in the single ling like td or tr but not sure how to do tr and td on the same loop. Any helps? Thanks in advance!
while($query=mysql_fetch_array($dataQuery)){
//not sure what to do here.
}
© Stack Overflow or respective owner