Please help me with this array printing.
Array
[year_2014] => Array
(
[0] => Array
(
[amount] => 21960
[year] => 2014
[month] => 1
)
[1] => Array
(
[amount] => 25866
[year] => 2014
[month] => 2
)
[2] => Array
(
[amount] => 7840
[year] => 2014
[month] => 3
)
[3] => Array
(
[amount] => 424644
[year] => 2014
[month] => 5
)
[4] => Array
(
[amount] => 22052
[year] => 2014
[month] => 6
)
[5] => Array
(
[amount] => 28037
[year] => 2014
[month] => 7
)
)
I need to echo amount in according to month so the Output will be,
Result
21960, 25866, 7840, 0, 424644, 22052, 28037, 0, 0, 0, 0, 0
That is if a month is not present then the value need to be zero,I need all the twelve month.
My dear Good Hearts please help me to get this result.
Some background
project is done in codeigniter , I have messed with some for, foreach but it's not working.
Thank you.