How can I replace to sub strings (html code)?
Hi,
I have that:
$x = ". . .
<div class="somecalss"> . . .
. . .
. . .
</div>
. . .";
$y = "some html code";.
How can I replace the <div> part in $x with $y?
I now that I can do it with RegEx (regular expression) and str_replace but how to define a RegEx?
How can do that?
Is it something like that:
$r='/\'<div class="somecalss">+.+'</div>''/\';
And then what?
Thanks.