Solved

Adding Headers To A Table

Posted on 2015-01-26
2
53 Views
Last Modified: 2015-01-26
I am having a problem adding headers to this table.  The three columns should be "Action", "First Name", "Last Name"

// PRINT OUT THE ROWS OF THE TABLE WITH UPDATE / DELETE LINKS
$out .= '<table class="CSSTableGenerator">' . PHP_EOL;
 				'<tr>'
				. '<td>'
				Action
				First Name
				Last Name
				. '<td>'
				'</tr>';
while ($row = $res->fetch_object())
{
    $out .= '<tr>'
    . '<td>'
    . '[<a href="RAY_EE_table_maintenance_form.php?id='
    . $row->id
    . '">update</a>]'
    . '[<a href="RAY_EE_table_maintenance_delete.php?id='
    . $row->id
    . '">delete</a>]'
    . '</td>'
    . '<td>'
    ;

Open in new window

0
Comment
Question by:DS928
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Michael Fowler earned 500 total points
ID: 40571929
You need to add each header in a <th> tag
http://www.w3schools.com/tags/tag_th.asp
eg

$out .= '<tr>'
                .'<th>Action</th>'
                .'<th>First Name</th>'
		.'<th>Last Name</th>'
	     '</tr>';

Open in new window

0
 

Author Closing Comment

by:DS928
ID: 40571942
Thank you so very much!
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn how to count occurrences of each item in an array.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question