Wednesday, 28 August 2013

Replace string from PHP include file

Replace string from PHP include file

Let's say I have an include file, foo.php, and it contains the text "this
file is foo".
So, when I load the include using <?php include 'foo.php'; ?>, I want to
be able to replace a string from the include before displaying the text it
contains.
So let's say I want to replace "foo" from the include with "cool".
Make sense?

No comments:

Post a Comment