Jump to content

[SOLVED] NEW problem with event calendar but so very close!


Recommended Posts

Ok, if anyone read my previous post they'll know a little bit about what I'm talking about. I got the calendar to do everything I need it to except for one thing. The date field in mysql requires the date be 2007-08-07. For some reason, the code has no problem recognizing 08 as 8 but it doesn't recognize 07 as 7. The calendar itself spits out 7 as opposed to 07 so when I compare the two, it doesn't recognize it as part of the array.

 

Does anyone know how to remedy this? Here is the code that actually does the checking:

 

if ($EventDate[$i]) {
    echo "<td width='24' height='16' class='event'><a href='showevent.php?day=$i' class='calendar'>$i</a></td>";

 

So like I said it's checking to see if, in this particular case, $EventDate[7] exists but actually . . . it's $EventDate[07] . . . does that make sense?

 

I would think the easiest way would be to convert 07 to 7 someway . . . but I don't know how.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.