FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Verifying time in php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Verifying time in php [message #179383 is a reply to message #179380] Sun, 14 October 2012 15:52 Go to previous messageGo to previous message
Christoph Becker is currently offline  Christoph Becker
Messages: 91
Registered: June 2012
Karma:
Member
houghi wrote:
> However I can not figure out how to do a check on all of them,
> without getting lost in if statements.

How about:

$ok = 0;
if (is_valid($hours)) {$ok++;}
if (is_valid($min)) {$ok++;}
if (is_valid($sec)) {$ok++;}

if ($ok) {
// fine :-)
} else {
// report error
}

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Curl chmod file transfer problem...
Next Topic: test
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 12:43:04 GMT 2024

Total time taken to generate the page: 0.03953 seconds