Complex Syntax Error php html : <p>I have a problem with syntax error. trying to upload image from directory into my list in html but it keeps saying things like:</p>

<p><strong>Parse error: syntax error, unexpected '"', expecting ',' or ';' in D:\xampp\htdocs\Waldi\index.php on line 243</strong></p>

<pre><code>&lt;?php

$dir="img/";


if($opendir=opendir($dir)){
  while(($file=readdir($opendir))!==FALSE){
    if($file!="." &amp;&amp; $file!="..")
     echo '&lt;li class="col-lg-4 col-md-4 col-sm-3 col-xs-4 col-xxs-12"&gt;
         &lt;img class="img-responsive" src='"$dir/$file"'&gt;
         &lt;/li&gt;';
  }
}
?&gt;
</code></pre>
