php-html-parser icon indicating copy to clipboard operation
php-html-parser copied to clipboard

Remove anchor tag from span?

Open sjking85 opened this issue 4 years ago • 0 comments

Hi there,

Is it possible to remove the anchor element from a span? My example code looks like this...

<span class="heading">
    <a class="noteRef commentary X" href="#c22gyr3">Z21</a>Sunday list
    <a class="noteRef commentary C" href="#cDww43">CLX1</a>
</span>

I've managed to display just the text using $title->text(true) but it prints as:

Z21Sunday listCLX1

All I want is the "Sunday list" or whatever the value of .heading is.

sjking85 avatar Dec 04 '20 00:12 sjking85