See if field exists:
if ($node->field_name) or isset($node->$field_name)
Debugging, to display an array:
<?php print '<pre>'. check_plain(print_r($profile, 1)) .'</pre>'; ?>
In a block, toggle image based on whether or not the user is logged in or not logged in (annonomous).
<?php global $user; ?>
<?php if (!$user->uid) { ?>
<P><A href="/user"><IMG class=mceItem alt="" src="/sites/all/themes/church_default/images/member_lg.jpg"></A></P>
<?php } else { ?>
<P><A href="/logout"><IMG class=mceItem alt="" src="/sites/all/themes/church_default/images/member_lg.jpg"></A></P>
<?php } ?>
Create and theme an image link using l:
l(theme('image',blah),node/blah, array('html' => TRUE));