![]() |
Help with preg_replace
Hi.
I'm a completely noob when it comes to regexp, so I guess I can post here for a little help :p I need to replace all the <br /> on a variable to simple line breaks (\n). The problem is that I need to replace the <br />'s that are ONLY inside a special tag, for example, the <myhtml> and </myhtml> tags. See: Code:
<html> Is that possible? Please help!! |
PHP Code:
|
How would you do that with vbcode tags like the php tags?
|
Hi filburt1. Thanks for your code, but it doesn't work as it should :(
It replaces absolutely all the <br />'s on the variable... But I only need to replace the <br />'s that are inside the <myhtml> and </myhtml> tags. For example: This: Code:
<html> Code:
<html> If you could help me with that one, I will thank you my whole life ;)! :p |
All times are GMT. The time now is 01:29 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|