1 | if ( $a == 1 and $b == 3 ){ |
2 | echo '$aは1であり$bは3である。' ; |
3 | } |
1 | if ( ! ( $a == 3 and $b == 3) ){ |
2 | echo '$aか$bが3以外です。' ; |
3 | } |
1 | if ( $a == 1 or $b == 1 ){ |
2 | echo '$aか$bのどちらかが1である。' ; |
3 | } |
4 | ?> |
1 | if ( isset( $var ) ){ |
2 | echo 'isset関数を使って検査' ; |
3 | } |