I have the following arrays which I'd like to combine / merge to create a single array that I can loop through to add images and their respective titles to a database.
Array 1:
[0] => array(1) {
["filename"] => string(22) "1463668615_1_image.jpg"
}
[1] => array(1) {
["filename"] => string(22) "1463668641_1_image.jpg"
}
Array 2:
[0] => array(1) {
["title"] => string(15) "My image title"
}
[1] => array(1) {
["title"] => string(5) "Title"
}
Here's the format of the array I'd like to create.
Merged Arrays:
[0] => array(2) {
["filename"] => string(22) "1463668615_1_image.jpg",
["title"] => string(3) "My image title"
}
[1] => array(2) {
["filename"] => string(22) "1463668641_1_image.jpg",
["title"] => string(0) "Title"
}