I-AM-OBODO Posted March 9, 2015 Share Posted March 9, 2015 Hi all. how can I use the results from my database query as a list items for a news ticker? thanks my code: $stmt = $pdo->query("SELECT * FROM ca_updates ORDER BY date DESC"); while($row = $stmt->fetch (PDO::FETCH_ASSOC)) { echo '<div id="example">'; echo '<ul>'; echo '<li>'; echo "<div class='update- heading'>"; echo "<h4><u>" . ucwords ($row['heading']) . "</u></h4>"; echo "</div>"; echo "<div class='update- date'>" . $row['date'] . '</ div>'; echo "<p class='update- contents'>" . $row ['contents'] . "</p>"; echo "</li>"; echo "</ul> echo "</div> Quote Link to comment Share on other sites More sharing options...
Barand Posted March 9, 2015 Share Posted March 9, 2015 http://lmgtfy.com/?q=news+ticker+for+website Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.