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

  • SEARCH
  • Home
  • 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 7755085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:28:45+00:00 2026-06-01T12:28:45+00:00

I have the following table. The header is at it looks and the content

  • 0

I have the following table. The header is at it looks and the content is generated within a PHP loop. It contains some taxes that a user has to pay and a tax can be paid in installments. For example, if the user has to pay a 100$ tax and he first pays 25$ and then 75$, there will be two rows in the table for that tax.

What I seem to fail to accomplish is to make a rowspan so the tax name will be displayed only once.

Any help is appreciated.

<table cellpadding="0" cellspacing="0" width="100%" class="sortable">
    <thead>
        <tr>                                                        
            <th width="10%">Tax name</th>
            <th width="10%">Value</th>
            <th width="10%">Paid</th>
            <th width="10%">Rest</th>            
        </tr>
    </thead>
    <tbody>
        <tr>                                    
            <td>Sign-up tax</td>
            <td>100$</td>
            <td>25$</td>
            <td>75$</td>                        
        </tr>   
        <tr>                                    
            <td>Sign-up tax</td>
            <td>100$</td>
            <td>75$</td>
            <td>0$</td>                        
        </tr>
    </tbody>
</table>

The PHP code looks like this:

<?php for ($i = 0; $i < count($tax_details); $i++): ?>
<tr>                                    
    <td><?php echo $tax_details[$i]['name']; ?></td>
    <td><?php echo $tax_details[$i]['value']; ?></td>
    <td><?php echo $tax_details[$i]['paid']; ?></td>
    <td><?php echo $tax_details[$i]['rest']; ?></td>                        
</tr>
<?php endfor; ?>
  • 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-06-01T12:28:46+00:00Added an answer on June 1, 2026 at 12:28 pm

    replace the html with this:

    <tbody>
        <tr>                                    
            <td rowspan="2">Sign-up tax</td>   <---add rowspan here
            <td>100$</td>
            <td>25$</td>
            <td>75$</td>                        
        </tr>   
        <tr>                                    
            <td>100$</td>         <---remove second sign-up tax from here
            <td>75$</td>
            <td>0$</td>                        
        </tr>
    </tbody>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that looks something like this: <table> <tr id=header> <th>Title</th> <th>Title</th>
I have the following CSS in my header: <style type=text/css> table, td { border-color:
I have the following table UserID | User knows -------------------- a | b a
I have an ajax call that refreshes the following table. Can I have the
I have the following schema, which I've simplified slightly: CREATE TABLE [dbo].[Header] ( [HeaderId]
I have following HTML table: <form method=post action=update-table.php> <table class=table-data style=width: 960px;> <thead> <tr>
Background: I have some data that I want to present in a table. Each
I have following Table with records for ActivityLog: ID, UserId, Category, Created 1 11
I have following table Id | Status | date ------------------- 1 | Onsite |2007
Imagine I have following table: NAME DATE OTHER_CONTANT 'A' '2012-06-05' 'baz' 'A' '2012-06-04' 'bar'

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.