HTML and PHP - Help with syntax


#1

I can’t seem to get this to function correctly because I am not sure where to put the closing curly braces.

<?php if(isset($attr['Material']) && !empty($attr['Material'])){?> <a href="<?php global $post; $material = get_post_meta($post->ID, 'Material', true); echo wp_get_attachment_url($material); ?>">Download</a>


#2

[php]<?php if(isset($attr['Material']) && !empty($attr['Material'])){?>
Download

<? } ?>[/php]

#3

Worked out just right. Thanks!!