Hi,
I was wondering if someone could help me out?
I am trying to display the 5 latest rows in my database.
Whenever I add a new entry it will replace one the divs.
The issue is I want slider$v variable to count down from 1-5 because it would be displayed 5 times. From what I understand that would be a for loop? But I am not sure.
If someone could help me it would be appreciated.
Thanks
Here is what I have so far.
//Slideshow Content
$e = mysql_query("SELECT * from table WHERE catid = 38 ORDER BY catid DESC LIMIT 5")or die (mysql_error());
while ($row = mysql_fetch_array($e)) {
$slider_pid = $row['catid'];
$slider_title = $row['title'];
$slider_desc = $row['metadesc'];
$slider_introtext = $row['introtext'];
echo ("<table><tr><td class=\"slider$v\">$slider_title<td></td></table>");
}
?>