Outputting a link as a button in node.tpl.php I am trying to rewrite the output of node.tpl.php.

I am using field link. I cannot figure out how to get the field to render as a button. I did find that the field is output as an array

I tried this but it just makes the link just a link to the page I am on:

&lt;a class="btn btn-danger btn-lg" href="&lt;?php print render ($content[field_amazon_link][LANGUAGE_NONE][0]['display_url']); ?&gt;"&gt;Buy Now&lt;/a&gt;


The devel module gives me this info. Keep in mind php is my week area. This is my first time rewriting a node file as I used to have a helper and he has moved on.

field_amazon_link (Array, 1 element)

0 (Array, 5 elements)
    url (String, 142 characters ) https://www.amazon.com/gp/product/B00ZGUBN3C/re...
    title (String, 83 characters ) https://www.amazon.com/gp/product/B00ZGUBN3C/re...
    attributes (Array, 1 element)
    html (Boolean) FALSE
    display_url (String, 83 characters ) https://www.amazon.com/gp/product/B00ZGUBN3C/re... 


And this is from the object devel tool
 field_amazon_link (Array, 1 element)

und (Array, 1 element)
    0 (Array, 5 elements)
        url (String, 142 characters ) https://www.amazon.com/gp/product/B00ZGUBN3C/re...
        title (String, 83 characters ) https://www.amazon.com/gp/product/B00ZGUBN3C/re...
        attributes (Array, 1 element)
        html (Boolean) FALSE
        display_url (String, 83 characters ) https://www.amazon.com/gp/product/B00ZGUBN3C/re..
This is what ultimately worked for me. I don't really understand it completely, but if anyone can shed some light on why it worked, I would really like to know.

&lt;a class="btn btn-danger btn-lg" target="_blank" href="&lt;?php print $content['field_amazon_link']['#items']['0']['url']; ?&gt;"&gt;Buy Now&lt;/a&gt;