I have following $data array
Array
(
[0] => Array
(
[match_day] => MD27
[price] => 95.33
)
[1] => Array
(
[match_day] => MD28
[price] => 97.82
)
[2] => Array
(
[match_day] => MD29
[price] =>
)
[3] => Array
(
[match_day] => MD30
[price] =>
)
[4] => Array
(
[match_day] => MD31
[price] =>
)
)
Now, my requirements is - replace empty entry of price attribute with previous price attribute.
foreach()function in PHP to loop through your array.