How can merge two arrays values in one array and save in database
When you are saving the multidimensional array you can use this code: $product_img_path[$count][‘wpc_resize_thumb_img’] = $upload_dir[‘url’].”https://wordpress.stackexchange.com/”.$resize_img_name; $product_img_path[$count][‘wpc_resize_bid_img’] = $upload_dir[‘url’].”https://wordpress.stackexchange.com/”.$resize_big_img_name; update_post_meta($post->ID, ‘wpc_images’, $product_img_path); That way you can get multidimentional array like you want: Array ( [1] => Array ( [wpc_resize_thumb_img] => http://localhost/test/wp-content/uploads/2015/06/Wallpaper_55-212×159.jpg [wpc_resize_big_img] => http://localhost/test/wp-content/uploads/2015/06/Wallpaper_55-500×375.jpg ) [2] => Array ( [wpc_resize_thumb_img] => http://localhost/test/wp-content/uploads/2015/06/Wallpaper_51-212×141.jpg [wpc_resize_big_img] => http://localhost/test/wp-content/uploads/2015/06/Wallpaper_51-500×333.jpg ) … Read more