Solved

Adding Headers To A Table

Posted on 2015-01-26
2
49 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
2 Comments
 
LVL 23

Accepted Solution

by:
Michael74 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now