Hello i would like to ask for some help with this code what i want is that in the rank appear s like the position for example, 1.blalba 2.dada 3.adada my actual code does not have that can some one help me this is my acutal code, $conn = mysql_connect($host,$user,$pass) or die("Unable to connect to MySQL server"); mysql_select_db($db,$conn) or die("Unable to select to MySQL database"); $query = "select playlist.id as playlist_id, playlist.user_id, playlist.username, playlist.playlist_name as playlist_name from playlist where playlist.user_id = '0' order by playlist.views desc limit 7"; $results = mysql_query($query); if(!$results) { echo 'query failed'; } else { while($row=mysql_fetch_assoc($results)) { $songName = $row['playlist_name']; print(""); /*print("<td ><a href='songs.php?id=".$row['song_id']."'><img src='$artistPhoto' width='25' height='20'/></a></td>");*/ print("<p style='font-family:century gothic; font-weight:normal; color: #3e3b2f; text-transform:lowercase; letter-spacing:1px;' >.<a href='playmyplaylist.php?pl_id=".$row['playlist_id']."&name=$songName'>$songName</a> </p>"); print(""); print(""); } } PHP: Thanks
$count = 1; while($row=mysql_fetch_assoc($results)) { $songName = $row['playlist_name'] echo "{$count}.{$songName}"; $count++; } PHP: