how can i replace all the anchors with each anchor text . my code is
$body='<p>The man was <a href="http://www.example.com/video/">dancing like a little boy</a> while all kids were watching ... </p>';
i want the result to be :
<p>The man was dancing like a little boy while all kids were watching ... </p>
i used :
$body= preg_replace('#<a href="https?://(?:.+\.)?ok.co.*?>.*?</a>#i', '$1', $body);
and result is :
<p>The man was while all kids were watching ... </p>