For your purposes, however, you might be reinventing the wheel. There are dozens of pre-existing variables available for you to use without any additional logic.
Code:
<if condition="$show['member']">
You're logged in.
<else />
You need to log in or register!
</if>
Can I use the above example with user profile fields?