on-internet
← Community

array_merge() returns null if one or more of arrays is empty?

Stack Overflow ·

I am using WordPress with the advanced custom fields plugin. This is a PHP based question because these get_field() fields contain object arrays. $gallery_location = get_field('gallery_location'); $gallery_studio = get_field('gallery_studio'); For example $gallery_location when dumped will return this: array(18) { [0]=> array(10) { ["id"]=> int(126) ["alt"]=> string(0) "" ["title"]=> string(33) "CBR1000RR STD Supersport 2014 001" ["caption"]=> string(0) "" ["description"]=> string(0) "" ["mime_type"]=> string(10) "image/jpeg" ["url"]=> string(94) "http://www.example.com/wp/wp-content/uploads/2

Comments

Sign in or sign up to comment and upvote.

No comments yet.