lucavilla
asked on
substituting a specified text in a file
from a file modifer.php I need to modify another file index.php substituting the text:
<div id=change this>foobar</div>
with this new text:
<div id=change this>abcdefghi</div>
what are the PHP commands to do this?
<div id=change this>foobar</div>
with this new text:
<div id=change this>abcdefghi</div>
what are the PHP commands to do this?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
don't know that.
it really depends on how much you know of the existing string. If the <div id=change this> and </div> is always the same marchents pretty much the shortest way.
ASKER