Im trying to convert XML to HTML, here part of the XML im trying to parse
<entry morerows="1">data 1</entry>
<entry morerows="2">data 2</entry>
<entry morerows="3">data 3</entry>
<entry morerows="4">data 4</entry>
This is supposed to turn into
<td rowspan="2">data 1</td>
<td rowspan="3">data 2</td>
<td rowspan="4">data 3</td>
<td rowspan="5">data 4</td>
I'v tried the following code without much success:
$content = preg_replace('/<entry morerows="([\d]+?)">/', '<tr '.('$1' + 1).'>' ,$content);
Yakalama grubu ile hesaplamak mümkün Im, benim soru nasıl ben "morerows" nitelik değerini yakalamak VE bu değere 1 eklemek ve o ile geçerli değeri değiştirebilirsiniz olduğunu. Sayısı <entry>
etiketleri 1 ile 255 arasında olabilir.