Title: Return only one array
Last modified: December 9, 2022

---

# Return only one array

 *  Resolved [bonumaster](https://wordpress.org/support/users/bonumaster/)
 * (@bonumaster)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/return-only-one-array/)
 * When we echo the images, it echo all the images inside the custom field, but 
   when we return, it just return one image. How to use return in here? We wanted
   to use return not echo because of one plugin. Thanks!
 *     ```
       $images = get_field('images');
       $size = 'full'; // (thumbnail, medium, large, full or custom size)
       if( $images ){
   
       	foreach( $images as $image_id ){
   
           echo wp_get_attachment_image( $image_id, $size );
   
       	}
       	}
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Support [ACF Support](https://wordpress.org/support/users/acfsupport/)
 * (@acfsupport)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/return-only-one-array/#post-16472473)
 * Hi [@bonumaster](https://wordpress.org/support/users/bonumaster/)
 * ACF Support Team here. This forum is generally used by ACF users to help each
   other out.
 * However, we would love to continue investigating and troubleshooting this issue,
   please can you create a ticket using our ​[support](https://www.advancedcustomfields.com/contact/)
   form and we can look into it further.

Viewing 1 replies (of 1 total)

The topic ‘Return only one array’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [return](https://wordpress.org/support/topic-tag/return/)

 * 1 reply
 * 2 participants
 * Last reply from: [ACF Support](https://wordpress.org/support/users/acfsupport/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/return-only-one-array/#post-16472473)
 * Status: resolved