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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -