Display php varibales in two columns

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dilnesaw
Forum Newbie
Posts: 5
Joined: Fri Apr 10, 2009 9:18 pm

Display php varibales in two columns

Post by Dilnesaw »

Greetings,

I want to display two derived PHP variables in two columns or in a table. Here is my code:

Code: Select all

 
<?php
   $link = ****
while($info = mysql_fetch_array( $data1))
{ 
$One .= $info['Name'] . "<br>";
$One .= $info['Video'] . "<br>";
$One .= $info['Title'] . "<br>";
}
?>
 
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"5\">"; 
echo "<tr>"; 
echo "<td>$One . "</td>"; 
echo "</tr>"; 
echo "<tr>"; 
echo "<td colspan=\"2\"><?php include("List.php"); ?>; 
echo "</tr>"; 
echo "</table>"; 
 
 
The List.php contains pictures where users can scroll up and down. But I want to show them side by side. I tried div, looks complex.

Any help is very appreciated !!

Thanks,

Dilnesaw
Last edited by Benjamin on Tue May 26, 2009 10:49 am, edited 1 time in total.
Reason: Added [code=php] tags.
User avatar
mikemike
Forum Contributor
Posts: 355
Joined: Sun May 24, 2009 5:37 pm
Location: Chester, UK

Re: Display php varibales in two columns

Post by mikemike »

It's not complex at all, check out the w3 schools website.
Post Reply