I have been tearing through the PHP books trying to find out how to do what I'm trying to do.
I have a multidimensional array:
Array ( [errorCode] => 0 [errorMessage] => [results] => Array ( [http://the_url_being_shortened] => Array ( [hash] => CRWYp [shortKeywordUrl] => [shortUrl] => http://bit.ly/18jXxp [userHash] => 18jXxp ) ) [statusCode] => OK )
I want to grab the value for the key [shortUrl] and write it into a document.
I have assigned the array to a variable, "$url". I have tried to do stuff like:
print_r($url['results']['shortUrl']);
but that doesn't get me to the value.
How do I parse the array to get to this value, in the above example, "http://bit.ly/18jXxp" so I can add it to my fwrite statement?
Thanks
spivey