paquettg/php-html-parser

Remove anchor tag from span?

sjking85 opened this issue · 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.