How to echo a variale in html (newbie)
<p>I wan to echo a random swf variable into html, but I can not seem to get the right result.</p>

<p>By checking with firebug I can see that it outputs my php code php echo '$randomImage'</p>

<p>What I have so far:</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"&gt;
&lt;html&gt;
&lt;head&gt;

&lt;style media="screen" type="text/css"&gt;

.content {
    position: absolute;
    height: 200px;
    width: 400px;
    margin: -100px 0 0 -200px;
    top: 25%;
    left: 50%;
}

&lt;/style&gt;

&lt;/head&gt;

&lt;body&gt;
&lt;?php

$imagesDir = '/';

$images = glob($imagesDir . '*.{swf}', GLOB_BRACE);

$randomImage = $images[array_rand($images)];

?&gt;


&lt;div class="content"&gt; 
  &lt;center&gt;&lt;object width="675" height="517"&gt;&lt;param value="&lt;?php echo '$randomImage' ?&gt;" name="movie"&gt;&lt;embed width="475" height="317" type="application/x-shockwave-flash" src="&lt;?php echo '$randomImage' ?&gt;"&gt;&lt;/object&gt;&lt;/center&gt;&lt;center&gt;&lt;/center&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
</code></pre>
