Jump to content

Date modification


86Stang

Recommended Posts

I'm always astounded at how simple the answers to my questions seem.  That probably doesn't say that much for my coding skills but it is what it is I guess. 

 

I've noticed that most of my problems are with syntax/structuring.  For example, I tried your solution Barand but without the single quotes around the "-2 hours".  Is there a site that anyone can recommend where I can learn how to properly structure this stuff?

Link to comment
https://forums.phpfreaks.com/topic/102102-date-modification/#findComment-522824
Share on other sites

It is not about coding skills. It is about research (and perhaps reading.)

 

The php manual (http://www.php.net/docs.php - I recommend the down-loadable CHM version because the index and search functions let you find most of what you are looking for) contains all the basic information that was used for writing books, tutorials, and most of the basic answers in a forum...

 

In the case of the strtotime() function, the syntax prototype in the manual indicates that the first parameter is a string (meaning it needs to be quoted and Barand would not have posted it that way if it did not need to be that way) -

 

Description

 

int strtotime ( string $time [, int $now] )

Link to comment
https://forums.phpfreaks.com/topic/102102-date-modification/#findComment-522834
Share on other sites

Archived

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

×
×
  • 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.