Ryan Fitzer

Ryan Fitzer

Anyone know how to get the actual caption for a video and not just SimpleXMLElement Object ( )?

I am new to PHP but I'm pretty sure when I run the array through print_r() that all key => value pairs should be printed as strings, even nested ones. Is there something I'm missing?

All other pairs are returned with actual strings

Thanks for any help.

Brad Dougherty

Brad Dougherty Staff

You can cast it to a string by putting (string) in front of it.

You might find it easier to get the PHP output and run unserialize() to turn it into an array.

Ryan Fitzer

Ryan Fitzer

Thanks Brad. For some reason it all the sudden started to work. I was using:


on videos with and without captions and both were returning "SimpleXMLElement Object ( )" for the caption only. Then all of the sudden, without changing anything, the string was being returned. Weird.

Thanks again for replying.

This conversation is missing your voice. Please join Vimeo or log in.