Jump to content

Need help printing a value from array


dictionarydefine
Go to solution Solved by Barand,

Recommended Posts

I have the following data stored in an array $example. I need to echo or print the fileUrl as seen in this array. I've tried print $example->fileUrl;

/ and echo $example['fileUrl']; but they don't return anything. Could someone please tell me how to extract fileUrl from this?
 
Array ( [0] => AudioFile Object ( [attributionUrl] => [commentCount] => 0 [voteCount] => [fileUrl] => http://api.wordnik.com/v4/audioFile.mp3/f450d7100e261f09de07e8c2bfba727613189511ce3d7b7ef208bf83670e6974 [audioType] => pronunciation [id] => 9904 [duration] => 0.78 [attributionText] => from The American Heritage® Dictionary of the English Language, 4th Edition [createdBy] => ahd [description] => [createdAt] => DateTime Object ( [date] => 2009-03-15 15:32:01.000000 [timezone_type] => 1 [timezone] => +00:00 ) [voteWeightedAverage] => [voteAverage] => [word] => cat ) [1] => AudioFile Object ( [attributionUrl] => http://www.macmillandictionary.com/dictionary/american/cat [commentCount] => 0 [voteCount] => [fileUrl] => http://api.wordnik.com/v4/audioFile.mp3/e4cb509de86748e409cedeee8965ba83d13d4c480d2086a2f1a05b3d04bb6b24 [audioType] => pronunciation [id] => 209579 [duration] => 1.07 [attributionText] => definition of cat from Macmillan Dictionary -- free online dictionary and thesaurus [createdBy] => macmillan [description] => see more at http://www.macmillandictionary.com/dictionary/american/cat [createdAt] => DateTime Object ( [date] => 2011-04-10 05:57:30.538000 [timezone_type] => 1 [timezone] => +00:00 ) [voteWeightedAverage] => [voteAverage] => [word] => cat ) 
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.