SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    Scary's On The Wall
    Join Date
    Apr 2003
    Location
    PA
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Name That Function!

    I don't remember the name of this function (or functions).

    All I know is what it does: You call this function and whatever is echo()ed is assigned to a variable. Then you call the same function or possibly another function again once you're done collecting data.

    Sound familiar to anyone? I'm asking because I want to be able to cache the output of some eval()ed code.

  2. #2
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    ob_start();
    echo 
    'hello';
    $foo ob_get_contents();
    ob_end_clean();
    echo 
    $foo//outputs hello 
    That the one?

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ob_start/ob_get_contents

    Edit: Gah. I had it typed at 6:29, hit submit... and it didn't submit. Just checked back on the tab and had to resubmit.

  5. #5
    Scary's On The Wall
    Join Date
    Apr 2003
    Location
    PA
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats it! Thanks a million, everyone.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •