title: error while using if statement inside image in php
body: <p>i have a codeigniter php website, in the image tag I have given an if statement to determine the source, the code is like below:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;img class="st_img" &lt;?php if(str_replace(' ', '',$val['unique_tblkey'])=='entertainment'){?&gt; src=" &lt;?php echo ADMIN_IMG.strtolower(str_replace(' ', '',$val['unique_tblkey'])).'s/'.$val['image'][0]['btp_image'];?&gt;"&lt;?php} else { ?&gt; src=" &lt;?php echo ADMIN_IMG.strtolower(str_replace(' ', '',$val['unique_tblkey'])).'/'.$val['image'][0]['btp_image'];?&gt; " &lt;?php } ?&gt;/&gt;
                  </code></pre>
  </div>
  </div>
  </p>
  <p>I am getting</p>
  <blockquote>
  <p>unexpected '}'</p>
  </blockquote>
  <p>this error is coming although there isn't any unwanted brackets, can anyone please tell me what is wrong in my code, thanks in advance</p>