OK, I'm trying to transform the following arrays in PHP into one multi-dimensional array. Given its 2 in the morning this is beyond my poor brain. The arrays are:
| Code: |
Array ( [3] => title1 [4] => title2 [5] => title3 [6] => title4 [7] => title5 [8] => title6 [9] => title7 ) Array ( [3] => description1 [4] => description2 [5] => description3 [6] => description4 [7] => description5 [8] => description6 [9] => description7 ) Array ( [3] => tags1 [4] => tags2 [5] => tags3 [6] => tags4 [7] => tags5 [8] => tags6 [9] => tags7 ) |
The index for each array is an ID which i would like o be part of the new array, so i would like it to look something like this:
| Code: |
Array ( [0] => Array ( [id] => 3 [title] => title1 [description] => description1 [tags] => tags1 ) [1] => Array ( [id] => 4 [title] => title2 [description] => description2 [tags] => tags2 ) [2] => Array ( [id] => 5 [title] => title3 [description] => description3 [tags] => tags3 ) [3] => Array ( [id] => 6 [title] => title4 [description] => description4 [tags] => tags4 ) [4] => Array ( [id] => 7 [title] => title5 [description] => description5 [tags] => tags5 ) [5] => Array ( [id] => 8 [title] => title6 [description] => description6 [tags] => tags6 ) [6] => Array ( [id] => 9 [title] => title7 [description] => description7 [tags] => tags7 ) ) |
PHP would be nice, but I'm stuck on logic, not syntax, so anything that can help is great.
Thanks
-------
Anyone who isn't confused really doesn't understand the situation
http://craigk.org/pictures/
Can you work out the code?