How do I use the $ sign to a string to make it a variable?
<p>I have made a small static test script for just explain what i want to do.</p>

<pre><code>&lt;?php
$test = "hello";
$demo = "php";
$x = array("hello"=&gt;"world","php"=&gt;"script");
echo $x[$test]."&lt;br /&gt;";
echo $x[$demo];
?&gt;
</code></pre>

<p>OUTPUT: world
        script</p>

<p>How could i get same output dynamically when values are come from database.</p>

<pre><code>$result = mysql_query("SELECT font FROM stone");

while($row = mysql_fetch_array($result))
  {
  echo $x[$row['font']]."&lt;br/&gt;";// values of $row['font'] are 'test' and demo
  }
</code></pre>
