Accessing deeper data in an array
<p><strong>UPDATE 4:</strong></p>

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

<p>returns the data I posted in the original question,</p>

<p>but</p>

<pre><code>print_r( $data-&gt;getAttributes() );
</code></pre>

<p>returns:</p>

<pre><code>[namePerson/first] =&gt; Oshiro 
[contact/email] =&gt; oshiro.wanen@gmail.com 
[namePerson/last] =&gt; Wanan )
</code></pre>

<p>so it does not contain the data_identity I am after which is in <code>$data</code></p>

<p><strong>UPDATE 3:</strong></p>

<p>It seems to have an getAttributes, so I tried:</p>

<pre><code>$data -&gt; data -&gt; getAttributes('data_identity')
</code></pre>

<p>But get the error:</p>

<pre><code>[Tue Jul 12 09:01:17 2011] [error] [client ::1] PHP Fatal error:  Call to a member function getAttributes() on a non-object in /var/www/page1.php on line 65
</code></pre>

<p><strong>UPDATE 2:</strong></p>

<p>I've tried both:</p>

<pre><code>$data -&gt; get('data_identity')
$data -&gt; data -&gt; get('data_identity')
</code></pre>

<p>both give the same error:</p>

<pre><code>[Tue Jul 12 08:46:26 2011] [error] [client ::1] PHP Fatal error:  Call to a member function get() on a non-object in /var/www/page1.php on line 63
</code></pre>

<p><strong>UPDATE 1:</strong></p>

<p>If I do this:</p>

<pre><code>$_SESSION['returned_array'] = array("id" =&gt; $openid);
print_r( $_SESSION['returned_array'] );
</code></pre>

<p>It returns the data as I have shown above.</p>

<p>However, doing this:</p>

<pre><code>$_SESSION['returned_array'] = array("id" =&gt; $openid['data:protected']['data_identity']);
print_r( $_SESSION['returned_array'] );
</code></pre>

<p>give me:</p>

<pre><code>[Mon Jul 11 19:52:38 2011] [error] [client ::1] PHP Fatal error:  Cannot use object of type LightOpenID as array in /var/www/page1.php on line 62
</code></pre>

<p><strong>ORIGINAL QUESTION:</strong></p>

<p>Using the following:</p>

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

<p>I get:</p>

<pre><code>[returnUrl] =&gt; http://localhost/page1.php 
[required] =&gt; Array ( ) 
[optional] =&gt; Array ( ) 
[verify_peer] =&gt; 
[capath] =&gt; 
[cainfo] =&gt; 
[identity:Lightdata:private] =&gt; 
[claimed_id:Lightdata:private] =&gt; https://www.google.com/accounts/o8/id?id=349fj398sdhf9h94eiwujf9843e9f398 
[server:protected] =&gt; https://www.google.com/accounts/o8/ud 
[version:protected] =&gt; 2 
[trustRoot:protected] =&gt; http://localhost 
[aliases:protected] =&gt; 
[identifier_select:protected] =&gt; 
[ax:protected] =&gt; 1 
[sreg:protected] =&gt; 
[data:protected] =&gt; Array ( 
    [data_ns] =&gt; http://specs.data.net/auth/2.0 
    [data_mode] =&gt; id_res 
    [data_op_endpoint] =&gt; https://www.google.com/accounts/o8/ud 
    [data_response_nonce] =&gt; 2011-07-05T18:04:58Z1Ctdh8tsgmlLrw 
    [data_return_to] =&gt; http://localhost/page1.php 
    [data_assoc_handle] =&gt; AOQobUflA4349fj398sdhf9h94eiwujf9843e9f3988RCX4lIqE 
    [data_signed] =&gt; op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle,ns.ext1,ext1.mode,ext1.type.namePerson_first,ext1.value.namePerson_first,ext1.type.contact_email,ext1.value.contact_email,ext1.type.namePerson_last,ext1.value.namePerson_last 
    [data_sig] =&gt; Z8OyG9w1349fj398sdhf9h94eiwujf9843e9f3982O/a349fj398sdhf9h94eiwujf9843e9f398iw= 
    [data_identity] =&gt; https://www.google.com/accounts/o8/id?id=349fj398sdhf9h94eiwujf9843e9f398
    [data_claimed_id] =&gt; https://www.google.com/accounts/o8/id?id=349fj398sdhf9h94eiwujf9843e9f398
    [data_ns_ext1] =&gt; http://data.net/srv/ax/1.0 
    [data_ext1_mode] =&gt; fetch_response 
    [data_ext1_type_namePerson_first] =&gt; http://axschema.org/namePerson/first 
    [data_ext1_value_namePerson_first] =&gt; Oshiro 
    [data_ext1_type_contact_email] =&gt; http://axschema.org/contact/email 
    [data_ext1_value_contact_email] =&gt; oshiro.wanen@gmail.com 
    [data_ext1_type_namePerson_last] =&gt; http://axschema.org/namePerson/last 
    [data_ext1_value_namePerson_last] =&gt; Wanen
</code></pre>

<p>How do I get the following value of the array only?</p>

<pre><code>[data_identity]
</code></pre>
