tags:

views:

103

answers:

1

Looking to replace:

#678#

with

<span id="note-678"></span>
+6  A: 

Try this:

$str = preg_replace('/#(\d+)#/', '<span id="note-$1"></span>', $str);
Gumbo