I want to get an array like this:
{
"version": "1397992135_1932",
"list": {
"20514072":["John Carter","FiExJGIpsek.jpg",1],
"7247045":["Joe Satriani","KzvE54Z4rlA.jpg",0],
"91120813":["Mikel Arteta","JnPwkLKGeCA.jpg",1]
}
}
In database I have simple rows:
id | name | photo | vip
How can I format result from query to what I want?
Update
I don't truly understand how to code this to fetch the data from DB if I have 100 records.