how to get access to variable objects?
<p>I have a question about access to object properties that will be used in a loop</p>

<p>I have an xml file withe a struture like this :  </p>

<pre><code>&lt;labels&gt;  
    &lt;artiste01&gt;  
        &lt;label&gt;Premiere image&lt;/label&gt;  
        &lt;label&gt;Deuxieme image&lt;/label&gt;  
    &lt;/artiste01&gt;  
    &lt;artiste02&gt;  
        &lt;label&gt;Description 1&lt;/label&gt;  
        &lt;label&gt;Description 2&lt;/label&gt;  
    &lt;/artiste02&gt;  
&lt;/labels&gt;  
</code></pre>

<p>I read the file :</p>

<pre><code>$label_file = file_get_contents('label_file.xml'); 
$label_xml = new SimpleXMLElement($label_file); 
</code></pre>

<p>Then I need to loop through any of the artistexx level.</p>

<p><code>$label_xml-&gt;artiste01-&gt;label[$i]</code> works, but how can I reference the <code>artistexx</code> as a variable ?</p>

<p>Is this possible ?
I can't figure out how to code this.</p>

<pre><code>$obj-&gt;loopid-&gt;label[$i]
</code></pre>
