Show the date and the creator on the item/browse pages

Hi!
I would like to show the the date and the creator in the item/browse pages. I already find a way, but I would like to put it as a "if" because without it I have wrong informations when they are no creators/dates. Could you help me?

I add this for the moment :

<div class="Creator"><p><?php echo __('Creator'); ?>:
<?php echo link_to_item(metadata('item', array('Dublin Core', 'Creator')), array('class'=>'permalink')); ?><p/>
</div>

<div class="Date"><p><?php echo __('Date'); ?>:
<?php echo link_to_item(metadata('item', array('Dublin Core', 'Date')), array('class'=>'permalink')); ?><p/>
</div>

Hi!


<div class="Creator"><p><?php echo __('Creator:'); ?>:
<?php
if ($creator = metadata('item', array('Dublin Core', 'Creator'))) :
echo link_to_item($creator, array('class'=>'permalink'));
endif;
?>
</div>

<div class="Date"><p><?php echo __('Date'); ?>:
<?php
if ($date = metadata('item', array('Dublin Core', 'Date'))) :
echo link_to_item($date, array('class'=>'permalink'));
endif;
?>
</div>

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Thanks again Daniel, you are a great help that's very nice!