How can I have a boolean returning function?
I mean like this on other programming language.
return true; // return false
                <?php
  function doSomething() {
    return true;
  }
The function you need could look like this:
  function check($var, $length) { 
    return (strlen($var)<=$length) && (isset($var));
  }
?>
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With