How to write tag in aid of XMLWriter?

there is a next object
0=> 
param=>
name=>'Size',
 'size'=>15 cm',
1=>
param=>
name=>'Size',
 'size'=>20 cm'



need to get these tags
<param name="Size">15 cm
 <param name="Size">20 cm


trying to do so

if (is_array($offer->param)) {
 foreach ($offer->param as $name => $value) {
 $writer->writeElement($name, Html::encode($value));
}
 }

get

<Size>15 cm<Size>
 <Size>20 cm<Size>

do not tell me how
July 2nd 19 at 17:36
0 answer

Find more questions by tags PHP