Jump to content

Delete parts of string


SaMike

Recommended Posts

Hi,

 

i'd like to delete all parts like this from my string:

<td class="vertTh">
blahblahbalbhalbha
</td>

So i want to delete everything that is between <td class="vertTh"> and </td>. There's multiple of these in string (the amount may vary).

 

Example:

if my string would be

HI!<br>
My name is Peter!<br>
<td class="vertTh">
bloabfsdff
</td>
I'm a cat!<br />
<td class="vertTh">
asdadsadasdasdas
dafmauahahahahahaa
</td>
being cat is fun!

Would come:

HI!<br>
My name is Peter!<br>
I'm a cat!<br>
Being cat is fun!

 

How would i achieve this?

Link to comment
https://forums.phpfreaks.com/topic/200551-delete-parts-of-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.