boolean-conditions

How should boolean expressions be written in PHP?

How should the following boolean expression be written in PHP: $foo = ""; if($var==TRUE){ $foo = "bar"; } or if($var==TRUE){ $foo = "bar"; }else{ $foo = ""; } or $foo = ($var==TRUE) ? "bar": ""; ...