Jump to content


Photo

Help! How would I do this?


  • Please log in to reply
2 replies to this topic

#1 Crazydog115

Crazydog115
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 24 July 2006 - 12:19 AM

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)

<?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;
}}
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

if ($month ==

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!

#2 scs

scs
  • Members
  • PipPipPip
  • Advanced Member
  • 86 posts
  • LocationUSA

Posted 24 July 2006 - 12:45 AM

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

#3 Crazydog115

Crazydog115
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 24 July 2006 - 12:55 AM

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

http://viralfix.dev....up.com/days.txt




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users