pre_replace multi-dimensional array problem
- by Martin
I want to replace word groups by links. I use a multi-dimensional array to define these (in the real world there will be thousands of them).
Here's the code:
$text = "<html><body><pre>
Here is Foo in text.
Now come Baz? and Bar-X.
Replace nothing here: Foo (followed by brackets).
</pre></body></html>";
$s…