Jump to content

Struggling with simple columns


Rifts

Recommended Posts

I can not figure this out...

 

<?php
include 'include/config.php';

$sql = mysql_query(" SELECT * FROM logos ");
while($row = mysql_fetch_assoc($sql)) 
{
echo $row['image'];
echo "<br />";
}

?>

 

now that is printing a nice list

 

now how can I just split it into two columns?

Link to comment
https://forums.phpfreaks.com/topic/221691-struggling-with-simple-columns/
Share on other sites

<?php
include 'include/config.php';

$sql = mysql_query(" SELECT * FROM logos ");
while($row = mysql_fetch_assoc($sql)) 
{
echo $row['image'];
    if($i%2==0){
       echo "  ";
    }else{
echo "<br />";
    }
    $i++;
}
?>

 

 

not tested. but should work

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.