Could you be a bit more specific? Those two statements seem to be
doing exactly what they're suppose to do as far as I can tell.
Breaking down your first statement:
$right_now=date("Y-m-d")."T00:00:00-05.00"
- The date("Y-m-d") gets the 4 digit year the 2 digit month (with
leading zero) and 2 digit day (with leading zero) and "-" characters in
between them. (In today's case: 2010-10-08)
- The "." (dot operator) concatenates the "T00:00:00-05:00" statement to
that date which was just retrieved.
- Then it's all stored as a string in the variable "$right_now"
As for the second statement, it just appears to be the same content as
the first statement, but hard coded. What exactly are you trying to
do? If you are looking to add time to the date the "date" function does
have some time features.
http://us.php.net/manual/en/function.date.php
Joseph Simshauser
sims...@stclair.k12.il.us
Technology Department
Cahokia Unit School District 187
http://cusd187.stclair.k12.il.us/techweb/
"History is much like an Endless Waltz. The three beats of War, Peace, and
Revolution continue on forever."
On 10/8/2010 6:59 AM, Paul Peacock wrote:
can someone tell me why these 2 statemtents are not interchangeable?
$right_now=date("Y-m-d")."T00:00:00-05.00";
$right_now="2010-10-08T00:00:00-05:00";
The second one works, but the first one doesn't. They both seem to
echo the same string.
Thanks.
Paul Peacock
Lexington High School
| Subscription info at http://www.tech-geeks.org |
| Subscription info at http://www.tech-geeks.org |