Connecting Tech Pros Worldwide Forums | Help | Site Map

don't know what the problem is

Newbie
 
Join Date: Jul 2008
Posts: 19
#1: Jul 3 '08
Expand|Select|Wrap|Line Numbers
  1. $expiration = $rown[0] ;
  2.     $chexpiraton = strtotime($expiration);
  3.      $x = $chexpiraton ? "true" : "false";
  4.  echo $x;
  5.  
rown[0] contains date in format 2009.10.12
the output is false whereas it should have been true. don't know what the problem here is.code looks fine.

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Jul 3 '08

re: don't know what the problem is


It's the dots (.). Replace them by, say, - and it should work.
Newbie
 
Join Date: Jul 2008
Posts: 19
#3: Jul 3 '08

re: don't know what the problem is


Quote:

Originally Posted by r035198x

It's the dots (.). Replace them by, say, - and it should work.

yes..it worked the output showed true but when i output the value of chexpiraton it doesn't show anything
Newbie
 
Join Date: Jul 2008
Posts: 19
#4: Jul 3 '08

re: don't know what the problem is


Quote:

Originally Posted by bips2005

yes..it worked the output showed true but when i output the value of chexpiraton it doesn't show anything

thank you very much it worked...i was using die indtead of echo.
Reply