supermerc Posted December 21, 2006 Share Posted December 21, 2006 Hey, in my page to view users profile I want to insert tables to organize the stuff a little.I want it to look like thisUsernameProfile Picture Name Email More stuff morestuffDescription More stuffI only have a couple of them in my view profile page but id like to know how to make it in a table looking like that.This is the code of where i got my things.[code]$profile_info = mysql_fetch_assoc($member_info); echo " <h1>$profile_info[username]</h1> <br /> <b>$drawavatar($r[author]); <br/> <b>Name: $profile_info[name] <br /> <b>Descriptions: $profile_info[description] <br /> <b>Email:</b> <a href='mailto:$profile_info[email]'>$profile_info[email]</a> <br /> <br /> ";[/code] Link to comment https://forums.phpfreaks.com/topic/31532-making-tables-in-php/ Share on other sites More sharing options...
jwk811 Posted December 21, 2006 Share Posted December 21, 2006 you will want to use a while string to list all the users you have.. heres an example..[code]<?phpwhile($row = mysql_fetch_assoc($member_info)) { extract($row);?> <tr> <td><?php echo $user_name; ?></td> <td width="120" align="center"><?php echo $picture; ?></td> <td width="120" align="center"><a href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a></td> </tr><?php} // end while?>[/code]and you can just add in a couple more rows for the other pieces you want.. how that helps Link to comment https://forums.phpfreaks.com/topic/31532-making-tables-in-php/#findComment-146096 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.