Jump to content

[SOLVED] Dumb question ....Spaces


Recommended Posts


how  do you add empty spaces... to make it look cool or table it ....

This is right now
Code:
print "<p>Wins - $r_win " . " Loss - $r_loss " . "Ties - $r_tie</p>";

[u]Displays:[/u]
Wins - 0 Loss - 0 Ties - 0


I[color=red] want .....[/color]
Wins - 0            Loss - 0            Ties - 0               

[color=blue][font=Verdana]or [/font] [/color]
Wins          Loss          Ties
  0              0              0
Link to comment
https://forums.phpfreaks.com/topic/35417-solved-dumb-question-spaces/
Share on other sites

[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.
Dosen't work ....

le down to the right because is not center is left aligment
<?php

you get the data sca

print<<<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;

?>
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: 0

User: test_5 | Win- 0 | Loss- 0 | Tie- 0 | Rank- 0 | Satus: 0 | Final Result: 0

User: test_6 | Win- 0 | Loss- 0 | Tie- 0 | Rank- 0 | Satus: 0 | Final Result: 0


I want this .....

    Users          Win            Loss            Tie            Rank          Status                  Final Result
user _Name        0                0                0              0                0                            0
User _name2        0                0                0              0                0                            0
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 this
Wins 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
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
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
<pre>
<?php
print
"<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
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.