How do i print image title in custom node for image gallery I use content types for image gallery and write own custom node for image gallery all images are show in custom node by following code but i don't know how to print the image title.

In this code i have given static title 'Circles and Cycles ' and i need dynamically title of every image.

&lt;div id="node-&lt;?php print $node-&gt;nid; ?&gt;" class="node-gallery"&gt;
&lt;ul class="product-grid"&gt;

    &lt;?php
        $imgcount = count($node-&gt;field_gallery_image['und']);
        for ($i = 0; $i &lt; $imgcount; $i++) {
        $image_uri = $node-&gt;field_gallery_image['und'][$i]['uri'];
            // url
            $masthead_raw = image_style_url('gallery-thumb', $image_uri);

    ?&gt;
      &lt;li&gt;
        &lt;div class="main-product-wrapper"&gt;
          &lt;a href="&lt;?php print file_create_url($node-&gt;field_gallery_image['und'][$i]['uri']); ?&gt;" rel="group-&lt;?php print $node-&gt;nid; ?&gt;" class="product-link"&gt;
       &lt;div class="product-item"&gt; &lt;img class="image&lt;?php print ($i + 1);?&gt;" src="&lt;?php print $masthead_raw; ?&gt;" /&gt;&lt;/div&gt;&lt;/a&gt;
          &lt;div class="product-title"&gt;&lt;a href="#"&gt;Circles and Cycles&lt;/a&gt;&lt;/div&gt;

      &lt;/li&gt;
      &lt;?php
        }?&gt;
    &lt;/ul&gt;

  &lt;/div&gt;
Create a view of your content type, then in this view select the fields as your content and then select the title and the image. then every image will have its own title. you can also theme it in any way that you want.

you need to output this view in your node page, so simply in your template.php and in hook_preprocess_node function suggest a theme hook for this content type (for example page--node--gallery.tpl.php) and then in the page--node--gallery.tpl.php output the view using views_embed_view("view_name","display").