Solved

Adding Headers To A Table

Posted on 2015-01-26
2
51 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

820 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