php odd file extension error
<p>Not quite sure what is going on. OK so basically the script is in a "if" function and compares present image extensions to the file thats being loaded into the page as such</p>

<pre><code>if ( $row['file_type'] == 'jpg' &amp;&amp; 'jpeg' &amp;&amp; 'png' &amp;&amp; 'gif') {  

    $img = "obj.php?id=".base64_encode($row['file_path'])."&amp;mode;thumb";

} else {

   $img = "assets/filesystem/file_extension_".$row['file_type'].".png";

}
</code></pre>

<p>If I replace "&amp;&amp;" with "or" it works, for JPG, PNG, JPEG and GIF but fails at else statement and does not run for all other file types so a docx would not be returned via file_extension_docx.png </p>

<p>Any clue as to why this is occurring? Since if I keep it at "&amp;&amp;" it has no problem running $img and returns thumbnails for all JPEG/JPG files but not PNG and GIF which are returned from assets as file_extension_png.png or file_extension_gif.png instead of being returned as image thumbnails via obj.php file</p>
