need some help with display format

Discussion in 'PHP' started by dougvcd, Mar 28, 2008.

  1. #1
    this is the code i use to display info
    but it shows 1 line under the other
    what do i need to do to say 3 fields side by side or what ever
    cheers
    Doug

    // Output 
    Echo "<b>ID:</b> ".$info['id'] . " <br>";
    Echo "<b>Name:</b> ".$info['name'] . " <br>";
    Echo "<b>State:</b> ".$info['state'] . " <br>";
    Echo "<b>Type:</b> ".$info['type'] . " <br>";
    Echo "<b>Email:</b> ".$info['email'] . " <br>";
    Echo "<b>Date:</b> ".$info['date'] . " <br>";
    Echo "<b>Area:</b> ".$info['area'] . " <br>";
    Echo "<b>Details:</b> ".$info['details'] . " <br>";
    Echo "<b>Photo:</b> ".$info['pname'] . " <br>";
    Echo '<a href="update.php?id='.$info['id'].'">Update</a>';
    Echo '<hr />';
    PHP:
     
    dougvcd, Mar 28, 2008 IP
  2. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #2
    Why not try using a table?

    echo "<table>
    <tr>
    <td>"<b>ID:</b> ".$info['id'] . "</td>
    <td><b>Name:</b> ".$info['name'] . "</td>
    <td><b>State:</b> ".$info['state'] . "</td>
    </tr>
    </table>";
    PHP:
     
    Weirfire, Mar 28, 2008 IP
  3. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks have now sorted
    cheers
    Doug
     
    dougvcd, Mar 29, 2008 IP
    Weirfire likes this.
  4. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #4
    you're welcome doug. Good luck with the site! :)
     
    Weirfire, Mar 29, 2008 IP