Grow your CSS skills. Land your dream job.

ob_Start()

  • # February 3, 2010 at 1:40 pm

    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?

    # February 3, 2010 at 4:35 pm

    Surely it is better to use string replacement?

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

    # February 3, 2010 at 9:05 pm

    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.

    FSX
    # February 4, 2010 at 8:31 am

    You can use preg_replace for that.

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

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".