-2

I have this code:

<p class="test">
<?php  
    $button_value = get_field('button_name');
    echo $button_value;
    if ($button_value == 1) {
        <a href="?page_id=26" class="get_quote">get quote</a> 
    }
?>  
</p>

This is the error:

Parse error: syntax error, unexpected '<' in /home/dgsite81/public_html/dgprint/wp-content/themes/dgprint/index.php on line 122
glennsl
  • 28,186
  • 12
  • 57
  • 75
gigi
  • 3
  • 1

1 Answers1

2
echo '<a href="?page_id=26" class="get_quote">get quote</a>';
  • 1
    given an added explanation, would benefit the OP to learn from their mistake. This answer has none. It's dropped in code. [Oh, I guess I did that already...](http://stackoverflow.com/questions/30988756/parse-error-syntax-error-unexpected-php#comment50007604_30988756) – Funk Forty Niner Jun 22 '15 at 20:08
  • Protip: Giving a good explanation, potentially attracts more upvotes ;-) – Funk Forty Niner Jun 22 '15 at 20:15
  • agree but this one was enough self-explanatory ;-) – www.diazis.com Jun 22 '15 at 20:31