-2

actually i am getting data from MySql and willing to make a ul list in php page with differant colors each line of data i used a method from css its working but i need diff colors for each row

for example if i echo from mysql data it comes like this https://i.stack.imgur.com/W6cV1.jpg

but i need https://i.stack.imgur.com/eLI81.jpg

like repeat the list as much it comes from mysql database

user2226832
  • 3
  • 1
  • 7
  • $stmt = $DB_con->prepare('SELECT * FROM lt_news ORDER BY userID DESC'); $stmt->execute(); if($stmt->rowCount() > 0) { while($row=$stmt->fetch(PDO::FETCH_ASSOC)) { extract($row); ?>
  •   No Data Found ...
    – user2226832 Mar 30 '18 at 10:59