Open GoogleCodeExporter opened 9 years ago
$html =
'<html>'.
'<head>'.
'<style>'.
'table, td, th { border: 1px solid #D8A35E; padding:.2em; border-collapse: collapse;}'.
'th { background-color: #D8A35E; color: white; }'.
'</style>'.
'</head>'.
'<body>'.
'<center><h3>Customers</h3></center>'.'<br />'.
'<table>'.
'<thead>';
$html .= '<th>Customer ID</th>';
$html .= '<th>Email</th>';
$html .= '<th>First Name</th>';
$html .= '<th>Last Name</th>';
$html .= '</thead>'.
'<tbody>';
foreach($data as $row) {
$html .= '<tr>';
$html .= '<td>'.$row["customer_id"].'</td>';
$html .= '<td>'.$row["email_address"].'</td>';
$html .= '<td>'.$row["first_name"].'</td>';
$html .= '<td>'.$row["last_name"].'</td>';
$html .= '</tr>';
}
$html .= '</tbody>'.
'</table>'.
'</body>'.
'</html>';
The above Html code is written to generate pdf.
Please suggest if any changes are required.
Original comment by dahitule...@gmail.com
on 23 Jun 2015 at 8:47
Original issue reported on code.google.com by
dahitule...@gmail.com
on 23 Jun 2015 at 7:59Attachments: