I have a box model array
Array
(
[padding] => Array
(
[padding-top] => 0px
[padding-right] => 0px
[padding-bottom] => 0px
[padding-left] => 0px
)
[margin] => Array
(
[margin-top] => 0px
[margin-right] => 0px
[margin-bottom] => 0px
[margin-left] => 0px
)
[border] => Array
(
[border-size] => 0px
[border-style] => solid
[border-color] => #ff6600
)
)
And I need to output the following
padding-top : 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
margin-top : 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
border-size : 0px;
border-style: solid;
border-color: #ff6600;
I started with this
$box_model = array();
foreach($box_model_array as $key => $value){
$box_model[$key] = $key.':'.implode(';',$value).'';
}
return implode('',$box_model);
so I ended up missing the second array index.
What would be the fastest way to get the desired result? Any help is appreciated.