title: what is the proper syntax for php if statement escaped inside a link
body: <p>i want to change the link address depending on whether the value matches a certain value. but i am returning a syntax error. what do i need to change? the error that i am getting is syntax error, unexpected T_IF</p>
  
  <pre><code>echo "&lt;a href='".if($type=='group'){echo'link_a';}else{echo 'link_b';}."'&gt;".$usaname."&lt;/a&gt;
  </code></pre>