Hi Vikas,
Thanks a lot for your help. Really appreciate the help.
I am unable to use the code provided by you.
Not sure if I correctly explained the problem.
Let me try explaining again. Here goes.
I am actually created a list of days based on the number stored in the database.
If a persons logs into the system and reads the content for that day, that number is stored in the database.
On the first day 1 will be stored in the database.
On the fourth fifth day 45 will be stored in the database.
NOTE: Only numbers are stored with user id in the database.
Based on the number received from the database a list is created.
Future days are not displayed.
If the value received from the database is 1, then it will be displayed as:
Day 1
If the value from the database received in 26, then it be displayed as:
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
..
..
..
Day 26
If the value from the database received in 56, then it be displayed as:
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
..
..
..
Day 56
There are only 56 days to be displayed.
Want I am trying to archive is:
First column should be from day 1 to day 20.
Second column should be from day 21 to day 40.
Third column should be from day 41 to day 56.
Here is my original code.
<div class="divCol">
<span>Days:</span>
<br /><br />
<?php
$qryUserLastArticle="SELECT * FROM assetchk WHERE user_id = '".$_COOKIE['cookie_start_userid']."'";
$rsUserLastArticle = mysql_query($qryUserLastArticle);
$row = mysql_fetch_array($rsUserLastArticle);
$m_lastarticle = $row['lastarticleid'];
?>
<ul id="articleid">
<?php
for ($i=1; $i<=$m_lastarticle; $i++)
{
if($i != 57)
{
?>
<li>
<a href="/test/test.php?id=<?php echo $i; ?>">Day <?php echo $i; ?></a>
</li>
<?php
}
}
?>
</ul>
</div>
Hope this explanation helps.
If you could please help me out.
Any help will be appreciated.
Thank You.
Regards,
Meher