I have a mysql fetch that is populating an associative array with columns from the DB. One of the columns names is AMOUNT. so it looks like this:
Array ( [0] => Array ( [ID] => 259 [YEARMONTH] => 201105 [AMOUNT] => 54 [VALUE] => 12 ) [1] => Array ( [ID] => 259 [YEARMONTH] => 201106 [AMOUNT] => 32 [VALUE] => 34 ) )
All I want to do is echo the AMOUNTs like this:
54,32
So that I don't have trailing or heading commas.
Any suggestion for an elegant solution for this ? Thanks !