create table mysql query
create table tutorials_tbl(
tutorial_id INT NOT NULL AUTO_INCREMENT,
tutorial_title VARCHAR(100) NOT NULL,
tutorial_author VARCHAR(40) NOT NULL,
submission_date DATE,
PRIMARY KEY ( tutorial_id )
);
create table mysql query
create table tutorials_tbl(
tutorial_id INT NOT NULL AUTO_INCREMENT,
tutorial_title VARCHAR(100) NOT NULL,
tutorial_author VARCHAR(40) NOT NULL,
submission_date DATE,
PRIMARY KEY ( tutorial_id )
);
Create a table with PHP in html
<?php
$inputfile = file("prod.txt");
$data_lines = array();
foreach ($inputfile as $line)
{
$data_lines[] = explode(";", $line);
}
//Get column headers.
$first_line = array();
foreach ($data_lines[0] as $dl)
{
$first_line[] = explode("=", $dl);
}
$headers = array();
foreach ($first_line as $fl)
{
$headers[] = $fl[0];
}
// Get row content.
$data_cells = array();
for ($i = 0; $i < count($data_lines); $i++)
{
$data_cell = array();
for ($j = 0; $j < count($headers); $j++)
{
$data_cell[$j] = substr($data_lines[$i][$j], strpos($data_lines[$i][$j], "=")+1);
}
$data_cells[$i] = $data_cell;
unset($data_cell);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HTML Table With PHP</title>
</head>
<body>
<table border="1">
<tr>
<?php foreach ($headers as $header): ?>
<th><?php echo $header; ?></th>
<?php endforeach; ?>
</tr>
<?php foreach ($data_cells as $data_cell): ?>
<tr>
<?php for ($k = 0; $k < count($headers); $k++): ?>
<td><?php echo $data_cell[$k]; ?></td>
<?php endfor; ?>
</tr>
<?php endforeach; ?>
</table>
</body>
</html>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us