Jump to content

Displaying data horizontally not vertically


Rifts

Recommended Posts

When I run this it outputs the data down in a straight line like this

 

name

phone

email

 

name

phone

email

 

name

phone

email

 

 

but I want to display it like this

 

name        name          name

phone        phone        phone

email        email          email

 

name        name          name

phone        phone        phone

email        email          email

 

here is my code im currently using

while($row = mysql_fetch_array($result))
  {
  echo "<div style='font-size:15px'>";
  echo "<font color='red'>Name:</font>" . " " . $row['name'] . "<br>";
  echo "<font color='red'>Number:</font>" . " " . $row['number'] . "<br>";
  echo "<font color='red'>Email:</font>" . " " . $row['email'] . "<br>";
  echo "<font color='red'>Phone:</font>" . " " . $row['phone'] . "<br>";
  echo "<font color='red'>Comments:</font>" . " " . $row['comments'] . "<br>";


  echo "<br />";
  echo "<br />";
  echo "<br />";
  echo "</div>";

  }

 

thanks

 

Link to comment
Share on other sites

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.