WordPress.org

Ready to get started?Download WordPress

Forums

how to replace html page content and not append with php 'echo'? (1 post)

  1. Tanveer Dewan
    Member
    Posted 1 year ago #

    I am using a php custom code to send the html page content to a string $html. Then I make some changes to the data in that string and then 'echo' it back to the html.
    The problem is that I get two versions of the html elements, one with and the other without the changes. the 'echo' function seems to append to the existing html page and not overwrite it. How can I replace and not append to the html page?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags