I didn´t get an answer yesterday on this question. https://stackoverflow.com/questions/15206351/jquery-slider-with-newest-content-first-gets-reversed-thumbnails-clicking-on-fi
So I tried for a simpler solution. I want to change this code:
$news_countpp = 6;
$result = mysqli_query($con,"SELECT * FROM tbl_news ORDER BY id DESC LIMIT ".($news_page * $news_countpp).", $news_countpp");
while($row = mysqli_fetch_array($result))
{
echo "<div><a href='#".$row['id']."' class='cross-link'><img src='/assets/images/news/news_".$row['id']."_slider_thumb.jpg' alt='".$row['news_img_alt']."' class='nav-thumb' alt='temp-thumb' style='width:60px; height:40px;'></a></div>";
}
The Part <a href='#".$row['id']."
would echo descending numbers from #6 - #1. (newest news hast highest ID)
I want the numbers to be ascending instead (not according to the id) than it works.
I tried the following array instead of ".row['id'].":
$thumblink = array ('1', '2', '3', '4', '5', '6');
for ($i = 0; $i < 6; $i++) {
echo $thumblink[$i];
}
But this gives each of my 6 thumbnails the href "123456" instead of ascending numbers from 1 - 6 for the individual thumbnails. Do you know what I do wrong?