i need to get the name of a variable from a file
<p>As the title said i need a way to set the variable name depending of what the name of the picture is (i got over 100 different pictures)</p>

<p>Since i got custom classes in another php file for each picture (like tags) like for example:</p>

<pre><code>$picture1 = "hillside sunset";
$picture2 = "beach cyprus";
</code></pre>

<p>and so on, so i need to fetch each variable for each picture</p>

<p>Heres the current loop where the div class is going to be each pictures name ($PICTURENAME is just to define where this code goes and is irelevant codewise):</p>

<pre><code>&lt;?php
foreach (glob("img/*.jpg") as $filename)
{
$path = $filename;
$file = basename($path);
$file = basename($path, ".jpg");
echo '&lt;a href="?image='.$file.'"&gt;&lt;div class="'.$PICTURENAME.'" id="'.$file.'"&gt;&lt;img src="'.$filename.'"&gt; '.$file.' &lt;/div&gt;&lt;/a&gt;';
}
?&gt;
</code></pre>
