I want to add differents values into a string in after a certain value.
For example :
$values = [ "<first><first>","<second><second>","<third><third>"];
$string = "<A1>
<B1>...<B1>
<C1>...<C1>
<D1>
<example><example>
<D1>
<B2>...<B2>
<C2>...<C2>
<D2>
<example><example>
<D2>
</A1>
<A2>
<B1>...<B1>
<C1>...<C1>
<D1>
<example><example>
<D1>
</A2>"
And i want to add the values after the <example><example> . Final result will be like this :
$string = "<A1>
<B1>...<B1>
<C1>...<C1>
<D1>
<example><example>
<first><first>
<D1>
<B2>...<B2>
<C2>...<C2>
<D2>
<example><example>
<second><second>
<D2>
</A1>
<A2>
<B1>...<B1>
<C1>...<C1>
<D1>
<example><example>
<third><third>
<D1>
</A2>"
<example><example>, append your value / replace with<example><example>+ value, repeatstrposfor that