Crazydog115 Posted July 24, 2006 Share Posted July 24, 2006 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)[code=php:0]<?php$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;}}[/code]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[code=php:0]'<a href="mysite.com/Archive/July/1.php">1</a>|2|3|'[/code]They would all link to the July folder..I need to know how to make it, so that I can have something like this:[code=php:0]'<a href="mysite.com/Archive/" . $lmonth . "/1.php">'[/code]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! Quote Link to comment https://forums.phpfreaks.com/topic/15437-help-how-would-i-do-this/ Share on other sites More sharing options...
scs Posted July 24, 2006 Share Posted July 24, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/15437-help-how-would-i-do-this/#findComment-62591 Share on other sites More sharing options...
Crazydog115 Posted July 24, 2006 Author Share Posted July 24, 2006 each is a day, and that variable is for the 14th day of the month..If you want to see the whole script, go herehttp://viralfix.dev.thebuddygroup.com/days.txt Quote Link to comment https://forums.phpfreaks.com/topic/15437-help-how-would-i-do-this/#findComment-62596 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.