How do I hide field in node.tpl.php? I would like to hide this field if it is empty. No clue where to start with my limited PHP/Drupal knowledge. The Else would be "Nothing to see here."

&lt;?php 

  $my_field_value = $content['product:field_course_no_']['#object']-&gt;field_pd_number['und'][0]['safe_value'];


echo "&lt;input type=\"button\" value=\"Danh's Cart\" id=\"Adding PDC course\" onclick=\"setCookie('class','$my_field_value" . "r_000000000000');document.cartform.submit();\" style=\"float:none;\" /&gt;&lt;input type=\"hidden\" name=\"id\" value=\"$my_field_value\" /&gt;";


?>
Here you go:

    if(isset($content['product:field_course_no_']['#object']-&gt;field_pd_number['und'][0]['safe_value'])){ 
     $my_field_value =  $content['product:field_course_no_']['#object']-&gt;field_pd_number['und'][0]['safe_value'];
} else {
        $my_field_value = '';
}