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 7163805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:57:52+00:00 2026-05-28T13:57:52+00:00

Here’s my problem. I want to be able to buffer only the contents of

  • 0

Here’s my problem. I want to be able to buffer only the contents of the tables but not the header. Is it possible to pause the output buffering in php so that I could skip the buffering on the table headers and resume again at the beginning of the actual content?

<?php ob_start(); ?>
<table>
<tr>
    <th>Account</th>
    <th>Quarter</th>
    <th>Amount</th>
</tr>
    <?php 
    foreach($tc_item as $v){ 


    if($v->dbl_amt != 0){
    ?>
    <tr>
    <!-- Nature of Collection -->
        <td id="nature"><?php echo $v->strDescription; ?></td>
     <!-- Account Code -->     
        <td id="account"><?php echo $v->str_details; ?></td>
     <!-- Amount -->
        <td id="amount"><?php echo number_format($v->dbl_amt,2, '.', ''); ?></td>

    </tr>
    <?php } ?>
    <?php } ?>

</table>
<?php 
$_SESSION['or_details'] = ob_get_contents();
?>
  • 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-28T13:57:53+00:00Added an answer on May 28, 2026 at 1:57 pm

    If you don’t want to buffer the whole table, then don’t buffer it:

    <table>
      <thead></thead>
      <?php ob_start();?>
      <tbody></tbody>
      <?php $tbody = ob_get_flush(); ?>
    </table>
    

    If you want to buffer the whole table, but want the table body separately, then add another level of buffering:

    <?php ob_start();?>
    <table>
      <thead></thead>
      <?php ob_start();?>
      <tbody></tbody>
      <?php $tbody = ob_get_flush(); ?>
    </table>
    <?php $table = ob_get_clean(); ?>
    

    Alternatively, you can flush the current buffer without creating a new one. I don’t recommend this because it makes your code harder to follow. It’s also silly since if you’re just going to flush without capturing the string, you might as well not buffer in the first place:

    <?php ob_start()?>
    <table>
      <thead></thead>
      <?php ob_flush();?>
      <tbody></tbody>
      <?php $tbody = ob_get_contents(); // only contains output since last flush ?>
    </table>
    <?php ob_end_flush(); ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my proposed (very simplified to illustrate the problem space) design for a C#
Here the total height of all <div> 's are 900 pixels, but the jQuery
Here is a complete example. I want to forbid using A::set from objects casted
Here's what I want to do: Given a table PeopleOutfit (id int primary key,
Here's the method. I want to know if I am violating any best practices
Here is my problem : I have a post controller with the action create.
Here my problem: @Assert\Regex( * pattern=/^[A-Za-z0-9][A-Za-z0-9\]*$/, * groups={creation, creation_logged} * ) I'm using the
Here is a screenshot of the problem (in IE): http://img401.imageshack.us/img401/7580/screenield.jpg The above effect -
Here is my code...I have two dimensional matrices A,B. I want to develop the
here i want to understand the architecture of bluez (Bluetooth Stack Protocol). I understood

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.