Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Posts
    317
    Thanks
    24
    Thanked 3 Times in 3 Posts

    returning function boolean

    Hi Guys,

    I have a function that returns either true of false. How can i test if it's true?

    I'm using this is_bool(validateform) but it doesn't seem to work.

    validateform is my function.

    What am i doing wrong?

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by macleodjb View Post
    Hi Guys,

    I have a function that returns either true of false. How can i test if it's true?

    I'm using this is_bool(validateform) but it doesn't seem to work.

    validateform is my function.

    What am i doing wrong?
    PHP Code:
    if(validateform(...)){
     print 
    "Wooow, is true";
    }else{
     print 
    "hmmm, don't work";

    do you use?

    PHP Code:
    is_bool(validateform(.....)); 
    best regards
    Last edited by oesxyl; 01-24-2008 at 04:31 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •