0

I have a text like this <text **** display="none">****</text> any words and htmlcodes <text **** display="none">****</text> I want to remove all the string like this <text **** display="none">****</text> ,begin with <text , end with </text> contain with display="none" .

Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390
lpc2138
  • 15
  • 5

1 Answers1

0

what about this?

$solution = preg_replace("@<text[^>]*display=\"none\"[^>]*>.*?</text>@ims", "", $yourstring);
David Frank
  • 5,918
  • 8
  • 28
  • 43