Jay2391 Posted January 23, 2007 Share Posted January 23, 2007 how do you add empty spaces... to make it look cool or table it ....This is right nowCode:print "<p>Wins - $r_win " . " Loss - $r_loss " . "Ties - $r_tie</p>"; [u]Displays:[/u]Wins - 0 Loss - 0 Ties - 0I[color=red] want .....[/color]Wins - 0 Loss - 0 Ties - 0 [color=blue][font=Verdana]or [/font] [/color] Wins Loss Ties 0 0 0 Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/ Share on other sites More sharing options...
Orio Posted January 23, 2007 Share Posted January 23, 2007 Use tables, that's pure HTML.[url=http://www.w3schools.com/html/html_tables.asp]Enjoy[/url] :)Orio. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-167524 Share on other sites More sharing options...
Jay2391 Posted January 23, 2007 Author Share Posted January 23, 2007 I try that, I ask on the HTML forum long time ago ... no one knows.... so I just want to do emty spaces....I give up on HTML Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-167526 Share on other sites More sharing options...
pocobueno1388 Posted January 23, 2007 Share Posted January 23, 2007 [code]<?phpprint<<<HERE<table align='center'><tr align='center'><th>Wins</th><th>Losses</th><th>Ties</th><tr align='center'><td>$r_win</td><td>$r_loss</td><td>$r_tie</td></table>HERE;?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-167529 Share on other sites More sharing options...
boo_lolly Posted January 23, 2007 Share Posted January 23, 2007 [quote author=Jay2391 link=topic=123712.msg511718#msg511718 date=1169583899]I try that, I ask on the HTML forum long time ago ... no one knows.... so I just want to do emty spaces....I give up on HTML [/quote]if it's an HTML forum... they should know. and if you're going to work with php, you GOTTA know html really well. otherwise you're going to encounter problems like the one you have a million times. so you might as well learn HTML before you dive into php. that's just my opinion and i'm pretty sure everyone here will agree. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-167570 Share on other sites More sharing options...
pocobueno1388 Posted January 24, 2007 Share Posted January 24, 2007 I agree boo_lolly. HTML is like the fondation to all coding laguages. You have to have it on pretty much every page you work with, it's just unavoidable. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-167969 Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 Not that you couldn't do this with the PRE attribute if you really cared... or a fixed-width font. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-167980 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 Dosen't work ....le down to the right because is not center is left aligment<?phpyou get the data scaprint<<<HERE<table align='center'><tr align='center'><th>Wins</th><th>Losses</th><th>Ties</th><tr align='center'><td>$r_win</td><td>$r_loss</td><td>$r_tie</td></table>HERE;?> Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168076 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 Better Example:My Code: print "<br><br><p><h4>Players Records:</h4></p>"; while($r_row = mysql_fetch_array($r_result)){ $r_result_id = $r_row['result_id']; $r_tourney_name= $r_row['tourney_name']; $r_user_name = $r_row['user_name']; $r_win= $r_row['win']; $r_loss= $r_row['loss']; $r_tie= $r_row['tie']; $r_rank= $r_row['rank']; $r_scor1= $r_row['scor1']; $r_scor2= $r_row['scor2']; $r_scor3= $r_row['scor3']; $r_scor4= $r_row['scor4']; $r_scor5= $r_row['scor5']; $r_scor6= $r_row['scor6']; $r_scor7= $r_row['scor7']; $r_eliminated= $r_row['eliminated']; $r_final_result= $r_row['final_result']; $r_status= $r_row['status']; print "<p>User: $r_user_name | Win- $r_win | Loss- $r_loss | Tie- $r_tie | Rank- $r_rank | Satus: $r_eliminated | Final Result: $r_final_result</p>"; }Display like this :User: test_3 | Win- 0 | Loss- 0 | Tie- 0 | Rank- 0 | Satus: 0 | Final Result: 0User: test_5 | Win- 0 | Loss- 0 | Tie- 0 | Rank- 0 | Satus: 0 | Final Result: 0User: test_6 | Win- 0 | Loss- 0 | Tie- 0 | Rank- 0 | Satus: 0 | Final Result: 0I want this ..... Users Win Loss Tie Rank Status Final Resultuser _Name 0 0 0 0 0 0User _name2 0 0 0 0 0 0 Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168090 Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 What's wrong with the table? Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168095 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 when i do that it cascades...Result 1 result 2 result 3 ...... Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168099 Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 Then the HTML code is wrong. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168102 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 the samples are on top .... is exactly how I am doing it ... ??? Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168105 Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 Missing close tr tags. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168110 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 where... ??? print"<table align='center'><tr align='center'><th>Wins</th><th>Losses</th><th>Ties</th><tr align='center'><td>$r_win</td><td>$r_loss</td><td>$r_tie</td></table><br>"; Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168115 Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 Seriously? After the last column of each row. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168119 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 print"<table align='left'> <-------------------I need to use left here <tr align='center'><th>Wins</th><th>Losses</th><th>Ties</th><tr align='center'><td>$r_win</td><td>$r_loss</td><td>$r_tie</td></table>";and it displays like thisWins Losses Ties Wins Losses Ties Wins Losses Ties Wins Losses Ties 0 0 0 0 0 0 0 0 0 0 0 0 but if i do a <br>it cascades Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168120 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 print"<table align='left'><tr align='center'><th>Wins</th><th>Losses</th><th>Ties</th></tr><tr align='center'><td>$r_win</td><td>$r_loss</td><td>$r_tie</td></tr></table><BR>";this cascades....and i know you think I am retarded but I use desing mode on dreamweaver for this that is why I do not check this to often Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168123 Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 Cascades how? You have a heading row and a data row in each table. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168125 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 like i explain before it does this ...result1 result2 result3when aling center is cool but i need it to the left Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168128 Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 That doesn't make any sense... TABLEs are block level elements. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168136 Share on other sites More sharing options...
Jay2391 Posted January 24, 2007 Author Share Posted January 24, 2007 I did it like this tables didn't work ...echo "<pre>"; printf ("%-20s%-20s%-10s%-10s%-10s \n", "$r_user_name", "$r_win - $r_loss - $r_tie", "$r_rank", "$r_eliminated", "$r_final_result", "<br>"); echo "</pre>";hope that helps some people Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-168153 Share on other sites More sharing options...
ardyandkari Posted January 29, 2007 Share Posted January 29, 2007 i just entered in your html into dreamweaver and it displays normally. Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-171974 Share on other sites More sharing options...
paul2463 Posted January 29, 2007 Share Posted January 29, 2007 <pre><?phpprint"<table align='center'><tr align='center'><th>Wins</th><th>Losses</th><th>Ties</th></tr><tr align='center'><td>$r_win</td><td>$r_loss</td><td>$r_tie</td></tr></table>";?></pre>after posting this I noticed that someone else had put and it is wrong - sorry Quote Link to comment https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/#findComment-171979 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.