Hi Im trying to retrieve data from a mysql table and show them as news inside a <MARQUEE></MARQUEE> <?php include ("object.php"); $sql = "select * from news_line where status='enable' order by date DESC"; $res = mysql_query($sql); ?> PHP: so i used above query and display as this <?php while($dat=mysql_fetch_array($res)){ ?> <p><MARQUEE><?=substr($dat['news'],0)?></MARQUEE> <?php } ?> PHP: it works but i can not manage to show news, one by one in one line with this it shows several news in multiple MARQUEE any help would be great. Regards
This is because you are printing marquee tags every time, it should only be printed once: <p><MARQUEE> <?php while($dat=mysql_fetch_array($res)){ echo substr($dat['news'],0); } ?> </MARQUEE></p> PHP: