tags:

views:

30

answers:

2

i want to make a table from a mysql query where the table should show like

pic1       pic2     pic3
name1      name2    name3
-------------------------
pic4       pic5     pic6
name4      name5    name6

please say how it is possible by using php and html?

A: 

First get the result from the query and loop it.

// first make the connection..., then
$sql = "SELECT xxxxxx";
$result = mysql_query($sql);
foreach($rs = mysql_fetch_assoc()) {
  // put the echo statement here with the apropriate html tags.
}

if you want to learn deep, catch this link from sitepoing.com http://articles.sitepoint.com/article/php-gallery-system-minutes

Muneer
A: 

ok,it will show picture and corresponding name,picture1 will be a picture same as pic2,pic3 etc,name1 is a name of corresponding as like orkut or face book,i have tried like code;- for($i=0;$i<2;$i++) { ?>

                    <td>
                                        <table><tr>
                                        <td align="left" valign="top" ><a href="#"><img src="images/speak-pic.jpg" width="88" height="88" border="0" class="pic-bod" /></a></td>
                                      </tr>
                          <tr>
                                        <td align="left" valign="top" ><a href="#" class="link-ar"><? echo $t["profile_name"]?>  </a></td>
                                    </tr>
                            </table> 
                            </td>



   <?
   } 
   ?>
   </tr>
  <? }
   ?> 
mriganka3
Feel free to add new information to your question. But please note you should *edit* the question rather than *answer* it.
Álvaro G. Vicario