I know this sounds like a rookie question, but I have no idea why this is happening. I am working on a page with a lm trying to display a list of articles along with their images. I am using a while loop, and for some reason I only get one article/image. Also, the article/image I am getting is the last one. Why?
Here is my loop:
$sql = mysql_query("SELECT * FROM article");
while($result = mysql_fetch_array($sql)) {
echo "<img src='$result[photo]' />";
}
Any suggestions? Thanks in advance...