How to print image url in foreach I successfully print the image url for a individual images by the following:

$file = file_load($node-&gt;field_hp_slideshow_image['und'][0]['fid']);
                print file_create_url($file-&gt;uri);


How can I do something similar but display the url of multiple images in a for or for each loop? Below I have this but it doesn't work:

&lt;?php $slide_image = $node-&gt;field_hp_slideshow_image['und'];
    $slide_url = $node-&gt;field_hp_slideshow_link['und'];
    $file = file_load($node-&gt;field_hp_slideshow_image['und'][0]['fid']);
    print $field_hp_slideshow_image['und'][0]['filename'];
    print file_create_url($file-&gt;uri);
?&gt;
&lt;?php for ($i = 0; $i &lt; count($slide_image); ++$i): ?&gt;
    &lt;div class="slideContent"&gt;
        &lt;a href="&lt;?php print $slide_url[$i]['url']; ?&gt;"&gt;
        &lt;img src="&lt;?php print $base_url . "/" . $path . "/" . $slide_image['filename']; ?&gt;" alt="" /&gt;
        &lt;/a&gt;
    &lt;/div&gt;
&lt;?php endfor; ?&gt;
Install Image URL Formatter and change the format to its url. To do so create a view of set of nodes, select the image as the field and change its format to URL. You can also change the format to URL in the manage display of the content type.