title: Adding a ternary operator to a hyperlink in a while loop
body: <p>I am working on adding an if statement to my while loop that is returned from my mysql query.
  I have 4 document paths, depending on the category the path is different.
  I have been searching Google all day, so far the best I  have been able to come up with is using a Ternary which i have put into my code but it keeps throwing an err, and I get a blank white page. I think I must have my quotes wrong or something.
  I need to repeat the if statement 4 times but i am trying to get it to work right once first.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>    echo "&lt;td&gt;&lt;a href=\"".((.$row ['category'].=='Validation_Letter') ? "../../../../Docs/Doc/val_letters/":"")."".$row ['filepath']."\"&gt;".$row ['filepath']."&lt;/a&gt;&lt;/td&gt;";
  </code></pre>
  
  <p>Thanks in advance for any help you can give.</p>