Jump to content

Recommended Posts

There's nothing wrong with the line of code you posted. It will subtract one from any value in $tempyear and assign that to $year, even if $tempyear does not exist or is a null value or if it is a character string.

 

How do you know you are getting nothing? What value should you be getting? What is your actual code that exhibits the problem?

 

  >.<

 

hmm... weird.  I thought I had put an echo statement to show the year and it was coming up.  Now it isn't at all.  I simply assigned the year the correct value and it works fine.

 

I'm not sure what I was seeing originally or what I did, but I must've made an error somewhere in my troubleshooting. LOL.  Originally, I was getting an error on this: $days_in_month = cal_days_in_month(CAL_GREGORIAN, $month, $year) ;  because $year had no value.  I thought maybe cal_days_in_month had changed, so I echoed the $year to find it had no value.  I then placed that echo command earlier and ... well... I thought it was returning a value... I guess not.

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.