I'm getting two arrays $post_img & $post_sort resulting:
Array
(
[0] => test1.jpg
[1] => test2.jpg
[2] => test3.jpg
)
Array
(
[0] => 3
[1] => 1
[2] => 2
)
I'd like to merge them like:
Array
(
[Image] => Array
(
[0] => test1.jpg
[1] => test2.jpg
[2] => test3.jpg
)
[Sort] => Array
(
[0] => 3
[1] => 1
[2] => 2
)
)
Because I think its the best way to insert them into my Database each entry in one row like:
ID | Image | Sort
1 test1.jpg 3
2 test2.jpg 1
3 test3.jpg 2
The point is that I think this should be possible with only one query. I had different tries but none of them ended up good.