Loop to pull database values into html table
Hi, I am pretty new to php but I have written a counter script to take visitors ip, browser info etc and store in a database. I am having trouble getting the loop to work. I think the way I am attempting is wrong but heres the code:
echo "<table>";
while($ips = mysql_fetch_array($ip_data) && $dates = mysql_fetch_array($date_data) && $links = mysql_fetch_array($link_data) && $browser = mysql_fetch_array($browser_data)) {
echo "<tr>";
echo "<td>". $ips{'ip'}. "</td>";
echo "<td>". $dates{'date'}. "</td>";
echo "<td>". $links{'link'}. "</td>";
echo "<td>". $browser{'browser'}. "</td>";
echo "</tr>";
}
echo "</table>";
Maybe you cant have so many things in a loop Im not sure
Any help please
|