html - Insert string between two points with PHP -
How do I insert text between the two comments below with PHP? thank you in advanced.
& lt ;! - BEGIN INSERT 1 - & gt; & Lt ;! - End INSERT 1 - & gt;
Maybe the first tag can be inserted later?
$ Afterinsert = str_replace ("INSERT 1 ->", "INSERT 1 - & gt; \ n". $ Toinert, $ pre-entry);
If you want to insert only when both are tags, use preg_replace.
Comments
Post a Comment