PHP逻辑AND的两个变量

I'd like to do this:

$var = ($var2 . $var3)

This means $var is only true if $var1 and $var2 are truthy (anything that will cast to a boolean true).

Do it like this:

 $var = ($var2 && $var3);

or simply like SQL:

 $var = ($var2 and $var3);

Read more about Logical Operators and how to use them at PHP manual. Both && and and operators are good enough for it, the only difference being the precedence.

$var = isset( $var2 ) && isset( $var3 );

?