if-clause

Understanding && in PHP if -clause

How can you get 1 as an output from #2? #1 I ran this code echo validate_email ( $email ); echo validate_password ( $password ); echo validate_username ( $username ); I get 111 which means that everything is ok. #2 I run this code function validate ( $email, $password, $username ) { if ( (validate_email ( $email ) == 1) ...

Check if $(this) has parents that have a class or id specified in an array

Hi again! First of all, after "testing" a while I have to say, stackoverflow is really really cool! To my question: I want to check if $(this) has not any parents that have a class or id specified in an js-array. By now I did this with "eval", but Andy E. just convinced me, that it is better to abandon "eval". However I have no clue h...

JavaScript false/null var inside if clause

Hello! What kind of variables will NOT pass through this: if(myVar){//code} Boolean false? NULL? Boolean false and NULL? Anything else? Thank you. ...

If-clause in a foreach loop at Smarty-template-system

I use Smarty as a template system in a script of mine. There is a page with drop-down-boxes (to select a music genre) and the form is reloaded with an on-change event. The value of the drop-down-boxes are transfered via GET. The drop-down-boxes should have the value selected before. The PHP-Code concerning the GET code is $get_ge...