Video.module: Rendering playablefiles programmatically I am trying to pull the "playablefiles" URIs from the array for a video field (hereafter: field_video).

Here's a look at how the array is set up.

I'm trying to pull a list of the files by this method, which seems to be in error:

  foreach($node-&gt;field_video['und']['0']['playablefiles']) {
    echo $node-&gt;field_video['und']['0']['playablefiles']['uri'];
  }


Can anyone tell me what I'm doing wrong here?
There are a few things that could do with attention...


A foreach statement needs an as keyword to keep a reference to the current object in the iteration (the docs explain it better than that, it's worth having a read). This error should throw an exception.
From the looks of the array each 'playablefile' is an object (not an array) so you need to access its members with -&gt; not []. If the interpreter makes it this far this should also throw an exception.
You can also make use of the API and make your code language safe using the field_get_items() function


The resulting code should be:

$field_items = field_get_items('node', $node, 'field_video');
foreach ($field_items[0]['playablefiles'] as $file) {
  echo $file-&gt;uri;
}