Welcome Guest, Not a member yet? Register   Sign In
Need Idea foreach
#1

Hi CI Team,
How to foreach data like below,

Database :
Code:
ID | viewed | code
1 | 15 | US
2 | 20 | SG
3 | 10 | US
4 | 30 | SG
5 | 30 | SG
6 | 55 | MY

How to get output like below,
Code:
var gdpData = {"US": 25,

"SG": 80,

"MY": 55,
};

ThanksĀ  Huh
Reply


Messages In This Thread
Need Idea foreach - by googlemy - 04-25-2018, 05:44 PM
RE: Need Idea foreach - by neuron - 04-25-2018, 11:05 PM
RE: Need Idea foreach [Solved] - by googlemy - 04-26-2018, 12:19 AM
RE: Need Idea foreach - by syedamirbukhari - 05-02-2018, 11:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB