How to echo PHP variable above the code
<p>I want to echo an variable $download at the top of my page . But the variable works only after the code , ie. echoing after the below code .The below link generates an unique id image from database. i would like to display that image url at the top.Thanks for help,</p>

<p>works</p>

<pre><code>&lt;?php $download = " http://www.domain.com/$rowimg[idimage]"; ?&gt;
&lt;?echo $download ?&gt;
</code></pre>

<p>not works </p>

<pre><code>&lt;?echo $download ?&gt;
&lt;?php $download = " http://www.domain.com/$rowimg[idimage]"; ?&gt;
</code></pre>
