Jump to content


This topic is now archived and is closed to further replies.


Help! How would I do this?

Recommended Posts

Alright...so I have this script and I'm trying to do something to it, and I can't figure out how...here it is...
(Only showing part)

$date = getdate();
$day = $date['mday'];
$month = $date['month'];
$fourt = '<b><font face="verdana" size="1" color="#464646">1|2|3|4|5|6|7|8|9|10|11|12|13|14|</font></b>';
if ($month == 'July') {
if ($day == 14) {
echo $fourt;
What I need to do, is add links to 1|2|3|4|5|6|7| etc. so that they go to the correct page in the archive...I can do all of this, but my ONLY problem is that:

Every month uses the SAME Variables to show the numbers, so if I did

'<a href="mysite.com/Archive/July/1.php">1</a>|2|3|'

They would all link to the July folder..
I need to know how to make it, so that I can have something like this:

'<a href="mysite.com/Archive/" . $lmonth . "/1.php">'

where $lmonth is the month in the

[code=php:0]if ($month ==[/code]

statement. But, I cannot just use $lmonth = $month, because I have up to 6 months archives showing at once...

Ask any questions if you need to know any more!

Share this post

Link to post
Share on other sites
If I understand this right each link is a month. So shouldn't there be 12. Just wondering.

Well I guess I still don't undstand what your trying to do. so here is what I think you should do.
Create an array with the months. Have a foreach or for loop and looping each month in a link. But thats where I don't get this. Why don't you just create the html to do that. So if you could explain more. You were a little to vague.  Thanks

Share this post

Link to post
Share on other sites
each is a day, and that variable is for the 14th day of the month..
If you want to see the whole script, go here


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.