Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

replace_in_output

With this function, you can replace any string in the output using a regular expression replacement.
The function will construct a preg_replace() function call from the parameters like this: $output = preg_replace("^$target^$modifiers", $replace, $output);

replace_in_output

Quote

replace_in_output ( string $target, string $replace, string $modifiers )


Parameters
target
What you want to replace

replace
This is what it will be replaced with

modifiers
The pattern to search for as a string.

Return Values
This function will not return anything

Example
Code
<?php
$target = "<!--news_prepost_2-->";
$replace = "<!--news_prepost_2-->n<br />Hello world!";
 
replace_in_output($target, $replace);
?>


Results from the above example

Quote

</tr>
</table>
<!--news_prepost_2-->
<br />Hello World!
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>



Changelog
7.00.00 - Function added to PHPFusion