I have been trying to merge two associative arrays all day. But I don't know whether it is possible or not in PHP.
first array
'images' =>
0 =>
'image_first' => string 'http://10.0.2.2/captcha-2/iphone.png'
1 =>
'image_first' => string 'http://10.0.2.2/captcha-2/1425328_405486846250283_806381377_o.jpg'
2 =>
'image_first' => string 'http://10.0.2.2/captcha-2/bbg.jpg'
3 =>
'image_first' => string 'http://10.0.2.2/captcha-2/gmail_bg.JPG'
second array
'images' =>
0 =>
'image_second' => string 'http://10.0.2.2/captcha-2/Capture.JPG'
1 =>
'image_second' => string 'http://10.0.2.2/captcha-2/bg.jpg'
2 =>
'image_second' => string 'http://10.0.2.2/captcha-2/abc.JPG'
3 =>
'image_second' => string 'http://10.0.2.2/captcha-2/bg_dark.png'
4 =>
'image_second' => string 'http://10.0.2.2/captcha-2/bktile.png'
And they should be merged together like this.
merged array
'images' =>
0 =>
'image_first' => string 'http://10.0.2.2/captcha-2/iphone.png'
1 =>
'image_first' => string 'http://10.0.2.2/captcha-2/1425328_405486846250283_806381377_o.jpg'
2 =>
'image_first' => string 'http://10.0.2.2/captcha-2/bbg.jpg'
3 =>
'image_first' => string 'http://10.0.2.2/captcha-2/gmail_bg.JPG'
4 =>
'image_second' => string 'http://10.0.2.2/captcha-2/Capture.JPG'
5 =>
'image_second' => string 'http://10.0.2.2/captcha-2/bg.jpg'
6 =>
'image_second' => string 'http://10.0.2.2/captcha-2/abc.JPG'
7 =>
'image_second' => string 'http://10.0.2.2/captcha-2/bg_dark.png'
8 =>
'image_second' => string 'http://10.0.2.2/captcha-2/bktile.png'
How to do it?