how to capture only one part of the getrawtransaction I want to capture just one part of what Getrawtransaction returns, but it returns an array within an array that i can't seem to process.
I.e when

$txid =
'4f52e7769fe23059a4f0fa2b66ca0ba9595812654b90cc0526ddb9703a3e1b33';
$txidarray = ($rpc-&gt;getrawtransaction($txid,1));

then I can grab the whole &quot;vout&quot; array element(s) with  :

print_r($txidarray[vout])

;
i.e that returns :
&gt; Array (
&gt;     [0] =&gt; Array
&gt;         (
&gt;             [value] =&gt; 0.077
&gt;             [n] =&gt; 0
&gt;             [scriptPubKey] =&gt; Array
&gt;                 (
&gt;                     [asm] =&gt; OP_DUP OP_HASH160 efe11230ccff2380c3115e2826098931bb76ccef OP_EQUALVERIFY OP_CHECKSIG
&gt;                     [hex] =&gt; 76a914efe11230ccff2380c3115e2826098931bb76ccef88ac
&gt;                     [reqSigs] =&gt; 1
&gt;                     [type] =&gt; pubkeyhash
&gt;                     [addresses] =&gt; Array
&gt;                         (
&gt;                             [0] =&gt; 1NsN84QPXSXEdojiC482PnJUGNfx9XduQ6
&gt;                         )
&gt; 
&gt;                 )
&gt; 
&gt;         )
&gt; 
&gt;     [1] =&gt; Array
&gt;         (
&gt;             [value] =&gt; 0.02636684
&gt;             [n] =&gt; 1
&gt;             [scriptPubKey] =&gt; Array
&gt;                 (
&gt;                     [asm] =&gt; OP_DUP OP_HASH160 ae57d86c288389e086eadf1bc50998d86ad2828a OP_EQUALVERIFY OP_CHECKSIG
&gt;                     [hex] =&gt; 76a914ae57d86c288389e086eadf1bc50998d86ad2828a88ac
&gt;                     [reqSigs] =&gt; 1
&gt;                     [type] =&gt; pubkeyhash
&gt;                     [addresses] =&gt; Array
&gt;                         (
&gt;                             [0] =&gt; 1Gtqoz4tNTLYBR13AxypwsXupsevcy5QPq
&gt;                         )
&gt; 
&gt;                 )

But how can i grab ONLY  &quot;1Gtqoz4tNTLYBR13AxypwsXupsevcy5QPq&quot;  ???
I just want to get that address from the getrawtransaction for an txid !!
I tried :

print_r($txidarray[vout,0,scriptkey[0]);

but does not work, no clue as to what the correct syntax is !! anyone can help me ? many thanks !
Looks like you're indexing the array incorrectly.

Try:

print_r($txidarray[vout][1][scriptPubKey][addresses][0]);