# Function to format custom tags 80% done \[need help\]

**URL:** <https://forum.kirupa.com/t/function-to-format-custom-tags-80-done-need-help/272598>\
**Category:** Uncategorized\
**Created:** [October 6, 2008, 9:52pm UTC](https://forum.kirupa.com/t/function-to-format-custom-tags-80-done-need-help/272598 "2008-10-06T21:52:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imagined](https://avatars.discourse-cdn.com/v4/letter/i/a87d85/32.png) [@imagined](https://forum.kirupa.com/u/imagined)\
**Post date:** [October 6, 2008, 9:52pm UTC](https://forum.kirupa.com/t/function-to-format-custom-tags-80-done-need-help/272598/1 "2008-10-06T21:52:34Z")

</div>

ok, im trying to program this custom function that will format data, according to if its tag (code, html, php and cmd wrapped by [and]).

Just that when there is a string that has more than one of those tags, lets say… php and html , it adds about 4 br tags on every line and it looks like im cuadruple spacing.

some help about how to avoid this? maybe using preg\_split instead?
