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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:37:07+00:00 2026-06-10T10:37:07+00:00

In my program I have created a table that is scrollable, everything is working

  • 0

In my program I have created a table that is scrollable, everything is working fine as far as the scroll bar showing up,the proper data being returned and so on.

What is strange and I can’t locate why, is that above the header of the table the word ‘echo’ is repeated 7 times, one for each record being returned. I’ve obviously got some flaw in my code, but I haven’t been able to locate it, any help is appreciated

    <?php
    echo "<div class='scrollableContainer'>";
    echo "<div style=' height: 125px; width: 535px; font-size: 10px; overflow: auto;'>";
    echo "<table class='referrals scrollable'>";
    echo "<thead><tr> 
            <th class='date'>Date</th>
            <th class='name'>Student Name</th>
            <th class='email'>Email</th>
            <th class='phone'>Phone</th>
            <th class='status'>Status</th>
    echo </tr></thead>";
            $query2 = "select * from students where referred_by ='$referral_id_to_use'";
            $result2 = mysql_query($query2);

            $num_rows = mysql_num_rows($result2);
            if($num_rows>0){
                 while  ($row = mysql_fetch_array($result2))
                  {
                       extract($row);
                         $student_name=$first_name.' '.$last_name;      
                 if($current_status=1)
                     {
                        $student_status="Active";
                     }else{
                        $student_status="Inactive";
                     }
        echo "<tr>\n
              <td class='date'><div>$date_joined</div></td>
              <td class='name'><div>$student_name</div></td>
              <td class='email'><div>$emailaddress</div></td>
              <td class='phone'><div>$phone_number</div></td>   
              <td class='status'><div>$student_status</div></td>
        echo </tr>";
            }
        }       
    echo "</table>";
    echo "</div>";
    echo "</div>";
    ?>

Again the extra line of echo’s appears above the table header.

Thank you

  • 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-10T10:37:09+00:00Added an answer on June 10, 2026 at 10:37 am

    You have the word echo as data between a </td> and </tr>.

    Since text isn’t allowed there, the browser is error recovering and moving it to somewhere it is allowed (before the table).

    <td class='status'><div>$student_status</div></td> echo </tr>";
    

    Delete the word ‘echo’ from the source.

    This type of thing is easier to pick up by examining the generated HTML, and running the generated HTML through a validator, rather then just comparing the PHP to the rendering in the browser.

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

Sidebar

Related Questions

I have created Excel Sheet using Java program. It works fine. My problem is,
I have created a non-form c# program that uses the NotifyIcon class. The text
I have a program that shows data in a datagridview. The data in the
I have a DetailsView control that I want to populate with a data table.
I have a custom VB.NET control that I created that is working correctly in
I have a table that is created and then deleted at the end of
I have created a database program where I am able to add the data
I have created a data table using disconnected class, also created the data set,xml
I have created a program which allows me to upload images to my server.
I have created a program with Windows Forms in C# and the architecture is

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.