top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

I can't apply css for “while” looping [on hold]?

+1 vote
203 views

I want to apply css for a while looping but it returns only the first data if i use css , and without css it returns all the data normally. here is my code it's simple.

$users=mysql_query("select * from users");
        while($user=mysql_fetch_array($users))
        {
        echo "<table>";
        echo "<tr>";
        echo "<td class='user'>";
        echo $user['pseudo'];
        echo "</tr>";
        echo "</td>";
        echo "</table>";
}
posted Jul 1, 2014 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Your problem is position:fixed. This tells the browser to lay all tables, one over the other, at window position right:500; left:500; top:100;. So, everything is there, but you tell the browser to put each new data set into a new table, and stack it in front of or behind the previous dataset (=table).

My best guess as to what you wanted to achieve is

$users=mysql_query("select * from users");
    echo "<table>";
    while($user=mysql_fetch_array($users))
    {
    echo "<tr>";
    echo "<td class='user'>";
    echo $user['pseudo'];
    echo "</td>";
    echo "</tr>";
    }
    echo "</table>";
answer Jul 3, 2014 by Devyani
Similar Questions
0 votes

I have an image called social-share-icon.gif.This image containing facebook,twitter and google+ icon.

In Css i need to use all icon as seperate.I don't have any idea how to use this.

Some one please help with example code.

...