Mega Code Archive
Categories
/
Php
/
Strings
Generating replacement strings with a callback function
<b>bold</b>'; print preg_replace_callback('@
(.*?)
@','decode', $html); function decode($matches) { return html_entity_decode($matches[1]); } ?>