How to return a specific value when using entity_load? I want to loop through Paragraph bundles and return a string (image path uri string).

I can view the Paragraph arrays as such:

foreach ($variables['field_paragraphs'] as $i) {
  $entity = entity_load('paragraphs_item', array($i['value']));
  dpm($entity);
}


This returns each Paragraph bundle as an multidimensional array. I want to take the value of each uri key and place them in their own array.

To that effect I have tried $image_path = $entity['ParagraphsItemEntity']['field_image']['und']['0']['uri'];, but it returns nothing.

I've also tried making a function.

  function array_column_recursive(array $haystack, $needle)
    {
        $found = [];
        array_walk_recursive($haystack, function ($value, $key) use (&amp;$found, $needle) {
            if ($key == $needle) {
                $found[] = $value;
            }
        });
        return $found;
    }
    print(array_column_recursive($entity, 'uri')[0]);


This gives me an error message.


  Fatal error: Cannot redeclare array_column_recursive();


(It doesn't seem to matter what the function is named; it will always have this error.)

Would anyone know how to simply get a value from a multidimensional array in Drupal?
OK, here's what I did, after discovering Entity Metadata Wrappers:

//FORMATS ARRAY TO SOMETHING EASIER TO HANDLE
$entity_wrapper = entity_metadata_wrapper('paragraphs_item', reset($entity));
//RETURN THE VALUE OF THE IMAGE ARRAY
$image = $entity_wrapper-&gt;field_image-&gt;value();
//RETURN THE (FULL) URL OF THE IMAGE
$file_url = file_create_url($image['uri']);