Solved

Adding Headers To A Table

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

743 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