I have some HTML content and I would like to replace a tag:
<span class='c1'>MY TEXT</span>
And keep MY TEXT. I tried with:
$result = preg_replace('/(<span class=\'c1\'>)(.*)(<\/span>)/', '$2', $my_string);
But the closed tag still remains? Can you help me and EXPLAIN where is my mistake? I would like to improve myself! Thank you