title: mySql and PHP syntax.. something simple is missing
body: <p>I am almost embarrassed to ask this, but I have been staring at it and feel like there is an easy answer but i'm not seeing/finding it.</p>
  
  <p>I have this line in my php where i am using a string "checked" to check a checkbox.  </p>
  
  <pre><code>&lt;input type='checkbox' name='hikeL[]' id=".$row["ID"]." ".$row["Chk"]."&gt;
  </code></pre>
  
  <p>I am trying to convert so that I can make it more powerful.. e.g. use a 1 or 0 to affect multiple things vs just checking the checkbox.  I have tried changing it to this, but there is clearly a syntax issue that I haven't been able to resolve.</p>
  
  <pre><code>&lt;input type='checkbox' name='hikeL[]' id=".$row["ID"]." ".$row["Chk"].==1 ? "checked" : "" "&gt;
  </code></pre>
  
  <p>this is all being echo'd in a greater statement...</p>
  
  <pre><code>while($row = $result-&gt;fetch_assoc()) {
  echo "&lt;tr class=''&gt;
  &lt;td class='hikesElement'&gt;
      &lt;form action='checkbox.php' method='post'&gt;
          &lt;input type='checkbox' name='hikeL[]' id=".$row["ID"]." ".$row["Chk"]."&gt;
      &lt;/form&gt;
  &lt;/td&gt;
  &lt;/tr&gt;";
  }
  </code></pre>
  
  <p>Any thoughts would be great.. kind of new to mySql and php, so much appreciated..</p>