# Replace "\[n\]blah\[n\]blah\[n\]" \> "1blah2blah3"

**URL:** <https://forum.kirupa.com/t/replace-n-blah-n-blah-n-1blah2blah3/204481>\
**Category:** programming\
**Created:** [October 20, 2006, 2:32am UTC](https://forum.kirupa.com/t/replace-n-blah-n-blah-n-1blah2blah3/204481 "2006-10-20T02:32:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [October 20, 2006, 2:32am UTC](https://forum.kirupa.com/t/replace-n-blah-n-blah-n-1blah2blah3/204481/1 "2006-10-20T02:32:07Z")

</div>

I can do this easily with PHP5 but for what im doing i would like to keep it in PHP4 for various reasons.

Basically every [n] is found in order and replaced with number. Whats the easiest way to do this that puts the least amount of stress on the CPU.
