Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End ob_Start()

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27858
    Makeshift
    Member

    Hello, I recently found this functions and I wanted to know if there was a way with it I can select and change tags?

    This is how I use it…

    Code:
    ob_start(“callback”);

    function callback($buffer){
    //do something
    return $buffer;
    }

    I wanna do something like changing this…

    Code:

    Welcome to my website

    To this…

    Code:

    Welcome to my website

    Is there a way I can do this in my function?

    #70469
    Makeshift
    Member

    well, personally, I like the strtr command rather than the str_replace one.

    But what I’m talking about is finding a certain tag, and changing it and or the content inside of it.

    #70486
    FSX
    Member

    You can use preg_replace for that.

    http://php.net/manual/en/function.preg-replace.php

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.