Hello fellow Trongate users,
I have an array being returned from my database json_encoded as follows:
However I need the keys to be mapped as follows:
Can anyone suggest a solution?
I tried the php array_map() method but failed miserably.
Cheers!
Database array mapping question
4 years ago
4 years ago
#1
4 years ago
#2
Hi man,
You could just change your query and add a few 'blah as bla' on the fields you want changed
You could just change your query and add a few 'blah as bla' on the fields you want changed
4 years ago
#3
Hi DaFa,
I thought about that only after posting the question....
Simple and performant.
Cheers!
I thought about that only after posting the question....
Simple and performant.
Cheers!