assign var to image name ( php )
<p>I am trying to play with php, I aint very good. But I figured its about time I started playing with it</p>

<p>What I have is say a page called ascr</p>

<p>Its filename is acsr.php</p>

<p>I have created a global php include, so I can play with different vars and include them dynamically.</p>

<p>So I have made a var called $shorttag = "acsr";</p>

<p>On my page I would like to use that shorttag to fire images and classes etc.</p>

<p>So for an image I want to display </p>

<pre><code>img src="/img/&lt;?php $shorttag; ?&gt;.jpg"
</code></pre>

<p>and in other places perhaps,</p>

<pre><code>div class="&lt;?php $shorttag; ?&gt;"
</code></pre>

<p>Is this the CORRECT way of doing stuff like this ?</p>

<p>//////////////////////////////////////</p>

<p>Example.</p>

<p>say I have folder with image in it called acsr.jpg</p>

<p>On my dynamic page I want to echo that image, but instead of using filename, I want to pull it in based on my php var , in this case its called $shorttag so essentially, $shorttag=acsr , and therefore I can spew out something like:</p>

<pre><code>&lt;?php $shorttag; ?&gt;.jpg
</code></pre>

<p>( code above more than likely wrong )</p>

<p>But the result gives me ascr.jpg</p>
