Re: [PHP] Re: how to test string to see if it is a date or time?

2003-03-24 Thread DomIntCom
PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Try this (as found on php.net) > > $str = 'Not Good'; > if (($timestamp = strtotime($str)) === -1) { > echo "The string ($str) is bogus"; > } else { > echo "$str == ". date('l dS of

Re: [PHP] Re: how to test string to see if it is a date or time?

2003-03-24 Thread DomIntCom
== -1) { > echo "The string ($str) is bogus"; > } else { > echo "$str == ". date('l dS of F Y h:i:s A',$timestamp); > } > > > Erwin Kerk > Web Developer @ BliXem.nl > > > > Jason Wong wrote: > > On Tuesday 25 March 2003

Re: [PHP] can't make str_replace work with single quote

2003-03-24 Thread DomIntCom
t; wrote in message news:[EMAIL PROTECTED] > works for me: > echo str_replace('2003','2002', "'2003-1;1 00:00:01' AND '2003-3-1 > 23:59:59'"); > > DomIntCom wrote: > > >this should be pretty straight forward, but I cannot

[PHP] can't make str_replace work with single quote

2003-03-24 Thread DomIntCom
this should be pretty straight forward, but I cannot make this work for some reason. $ndate = str_replace("'",'', "'2003-1;1 00:00:01' AND '2003-3-1 23:59:59'"); to extrapolate we have the following string surrounded by double quotes; '2003-1;1 00:00:01' AND '2003-3-1 23:59:59' now - I have even

[PHP] Re: how to test string to see if it is a date or time?

2003-03-24 Thread DomIntCom
can anybody help me out with this? I have figured out checkdate finally, but still have nothing that will help me with time validation. thanks, Jeff "Domintcom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a form that is passing a date variable, and

[PHP] Re: how to pass variable for $_GET

2003-03-23 Thread DomIntCom
thanks - found a solution... both method's worked for me "Nate" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > stripslashes("\'2003-1-3 00:00:01\' AND \'2003-3-10 23:59:59\'"); > > "Domintcom" <[EMAIL PROTE

[PHP] Re: how to pass variable for $_GET

2003-03-22 Thread DomIntCom
ok - found urldecode which is now giving me the following; \'2003-1-3 00:00:01\' AND \'2003-3-10 23:59:59\' original string; '2003-1-3 00:00:01' AND '2003-3-10 23:59:59' "Domintcom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL

[PHP] how to pass variable for $_GET

2003-03-22 Thread DomIntCom
ok - I know how to pass these variables by appending variables to the link. however, I'm trying to pass the following string; '2003-1-1 00:00:01' AND '2003-3-20 23:59:59' now - when I pass it what I get is the following; date='2003-2-1%2000:00:01'%20AND%20'2003-3-1%2023:59:59' it seems what I'm

[PHP] how to test string to see if it is a date or time?

2003-03-21 Thread DomIntCom
I have a form that is passing a date variable, and a time variable. I will be using these for a query, and will use the date function to do some formatting on it. now, I would like to idiot proof it a bit, but can't find any functions for this (hoping something similar to is_numeric exists). doe