Jump to content

Recommended Posts

I have a while loop that im trying to echo infomation horizontally rather than downwards.

Downwards is pretty easy cos i just use </br> but i want to space the echo's out horizontally by X amount yet i cant use div's cos then they will be the same height rather than the second row of the while loop being below it.. this is what i tried:

 

$Getcars = mysql_query("SELECT * FROM cars
                    WHERE UserID='{$_SESSION['Current_User']}'")
			or die(mysql_error());	
                  
// Fetch the row from the database
if(mysql_num_rows($Getcars) != 0){	
echo'<div id="bv_" style="position:absolute;left:50px;top:450px;width:450px;height:22px;z-index:1" align="left">';
while($row = mysql_fetch_array($Getcars)) {
$CarName = $row['CarName'];
$FuelLeft = $row['FuelLeft'];
Echo'<font style="font-size:14px" color="#FFFFFF" face="Arial"><b>';echo$CarName;
Echo'            ';Echo$FuelLeft;

 

As you can see above i put a Echo'                  '; of open space but on the page it still comes up right next to car name like:

 

Car Name                              Fuel Left

Nissan       100

 

I need it to be like :

Car Name                              Fuel Left

Nissan                                  100

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.