Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3321318
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:02:54+00:00 2026-05-17T23:02:54+00:00

Am I allowed to have two or more ob_start(); in my php files if

  • 0

Am I allowed to have two or more ob_start(); in my php files if so what is the proper way to end one ob_start(); and start another?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:02:55+00:00Added an answer on May 17, 2026 at 11:02 pm

    From the manual:

    Output buffers are stackable, that is,
    you may call ob_start() while another
    ob_start() is active. Just make sure
    that you call ob_end_flush() the
    appropriate number of times. If
    multiple output callback functions are
    active, output is being filtered
    sequentially through each of them in
    nesting order.

    In addition to stacking (nesting), you can have separate blocks in sequence.

    <?
    ob_start();
    echo "Foo";
    ob_end_flush(); // outputs buffer contents and turns off output buffering
    
    ob_start();
    echo "Bar";
    ob_end_flush();
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Summary Let's say I have two C# 4.0 classes, one inheriting from the other:
I have a file which contains two JSON arrays; one is holding the column
In .net we are not allowed to have shared function/methods in abstract classes and
We have a situation where users are allowed to upload content, and then separately
Have you determined a maximum number of characters allowed in FCKEditor ? I seem
Have you ever worked on a (full-time) project where using Agile methodologies actually allowed
For a particular project I have, no server side code is allowed. How can
I'm matching identifiers, but now I have a problem: my identifiers are allowed to
I want a rails model to exclude certain patterns: runs of two or more
I have a list wrapper that maintains two Tstringlists and a TClassList I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.