ストリング:[Name] => google [AF] => 0 [AX] => 2 [AL] => 1 [DZ] => 0 .....
出力:
[AX,2]
[AL,1]
[0] エントリの国はリストから除外されています
I have tried using sql but i want for php
Select '[AF,' + LTrim(Cast(Sum(AF) as varChar(5))) + ']'
From Table Where name = 'Andy'
Union
Select '[AS,' + LTrim(Cast(Sum(AS) as varChar(5))) + ']'
From Table Where name = 'Andy'
Union
Select '[AQ,' + LTrim(Cast(Sum(AQ) as varChar(5))) + ']'
From Table Where name = 'Andy'
また http://sqlfiddle.com/#!2/42756/5
しかし、私はphpで必要です