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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:31:42+00:00 2026-05-31T18:31:42+00:00

please i need you help with my script.. I’m trying to echo some content

  • 0

please i need you help with my script.. I’m trying to echo some content of query into an html table, but i want to break it at every 7th parameter. The script below only breaks the first seven, while the rest are not broken up at interval and they were also echoed out of the html table.

How can I do this please. Thank you for your time and help.

echo "<table class=\"altrowstable\" bgcolor = gold >\n";
$count = 0;

echo "<tr align= \"center\">\n";

$carry_over = array();
$score_count = mysql_numrows($query8);

echo "<td>" . "Failed: ";
if ($score_count !== 0) {
    while ($row8 = mysql_fetch_assoc($query8)) {
        echo "<th>" . $row8['course_code'] . "</th>";
        if ($count == 7) {
            echo "</tr>\n";
            echo "</table>";

        }
    }
}
  • 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-31T18:31:43+00:00Added an answer on May 31, 2026 at 6:31 pm

    Use modulo operator instead of equality

    if ( ($count+1) % 7 ){
    

    The +1 is there so that it doesn’t break immediately on $count == 0 because 0%n is 0

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help! Please. I am trying to develop a very very simple
I need some help with a LINQ query in VB.Net, please. I have this
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
I am getting a little confused and need some help please. Take these two
I need some with help with PowerShell, please. It should be pretty easy: I
Please help! I need to produce a Crystal Report with multiple data columns, but
I need some help with this please I can't get a handle on it.
Please i need you help my script. I'm generating a new column, whereby a
I need some help please. I need to create a drop down list and
I need some help please, I have a PHP page with a drop down

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.