i've got this array in PHP
Array(
'id' => Array(
'yearid' => '2000',
'typeid' => 'something',
'value' => 'somevalue'
)
'id2' => Array ...
...
)
What i'm trying to achive with it is to create a new array of same structure and values in the key 'value', but with different 'yearid' and 'typeid' values. (it is basically a copy of database entry spread across four tables).
I simply want to insert a year which has some id into database with newly generated id and then replace the oldid in array with this newid. All this done in foreach. Then go to 'types' table and do the same thing with that, leaving the value same.
I'am struggling with this for about two hours and i can§t find a solution. (PS: i don't really care about database performance as this will be an seldom used feature. Thats why i am using this approach)
'id'
. – David Normington Jul 29 '13 at 12:18