symrustar Posted April 25, 2006 Share Posted April 25, 2006 Hello! I am a complete PHP virgin, and yet have still managed to create a website using PHP, MySQL, and e_107. The site works beautifully, but I have one issue in which in the member profiles section I have added in some more extented user fields. The problem is that it displays all the extended user fields in one vertical column like this...123456And I would like the information to be displayed like this....1 23 45 6Do you guys have any idea of how/where to do this or maybe be able to point me in the right direction? All help greatly appreciated. Oh and please remember that I have no knowledge really of PHP so please in your answers talk to me like I'm 2yrs old so that I can understand it. I get lost in the lingo quite easily (prolly why alot of tutorials, and other help sites haven't helped much)Edit** [a href=\"http://darkseed.da.funpic.org/\" target=\"_blank\"]http://darkseed.da.funpic.org/[/a] <-- link to my site if it will help at all[a href=\"http://deathfromabove.de.funpic.org/\" target=\"_blank\"]http://deathfromabove.de.funpic.org/[/a] <-- link to a site that has exact example of how i would like the info to be displayed... to get to it click on the 'Member Bios' link on the left hand side... then in the main display area click on any of the user names that are there and the example is the "Job Levels" section of the info that is displayed. (Hope this makes sense/helps) Quote Link to comment Share on other sites More sharing options...
wisewood Posted April 25, 2006 Share Posted April 25, 2006 Change "$x%2" to show a number for how many columns you want to be displayed.eg. $x%21 23 45 6$x%31 2 3 4 5 6 $x%41 2 3 45 6[code]<?php$query= "SELECT * FROM your_table";$result = MYSQL_QUERY($query);$num = mysql_Numrows($result);if ($num==0) { echo "No Results Found !";}else if ($num>0) {$x=0;?><table class="content" align="center"><?while ($x<$num) { if (($x%2)==0) { $row="</tr><tr><td class=report>"; } else { $row="<td>"; } $whatever_variable = mysql_result($result,$x,"whatever_field");?><? echo $row ?><td class="report"><?=$whatever_variable?></td><? $x++; } // end while} // end if numberall > 0?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.