How i can access an object in php
<p>Please see this code below:</p>

<pre><code>for($i=0;$i&lt;=count($s-&gt;channel);$i++){
    echo "---&gt;".$ChannelName = $s-&gt;channel[$i]-&gt;{'display-name'};
    $arrChannelName[] = $ChannelName;
}

print_r($arrChannelName);
</code></pre>

<p>This return me output as Object instead of an array as:</p>

<pre><code>Array
(
    [0] =&gt; SimpleXMLElement Object
        (
            [@attributes] =&gt; Array
                (
                    [lang] =&gt; dk
                )

            [0] =&gt; DR1 DK
        )

)
</code></pre>

<p>Anybody please help...!!!</p>

<p>Regards</p>
