Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- table{
- display: block;
- width:1000px;
- min-height: 100px;
- position: relative;
- overflow: hidden;
- margin: auto;
- margin-top: 50px;
- }
- .nome{
- display: inline-block;
- width:400px;
- border: 2px solid black;
- }.numero{
- display: inline-block;
- width:80px;
- margin-left: 5px;
- border: 2px solid black;
- text-align: right;
- }
- </style>
- <?php
- $eachLine = explode(PHP_EOL, $detalhamento);
- $b = "<table>";
- foreach ($eachLine as $line) {
- $c = preg_split('/\s+/', $line);
- $b .= "<tr>";
- foreach ($c as $lines) {
- $b .= "<td class='nome'>" . $lines[0] . "</td>";
- $b .= "<td class='numero'>" . $lines[1] . "</td>";
- $b .= "<td class='numero'>" . $lines[2] . "</td>";
- $b .= "<td class='numero'>" . $lines[3] . "</td>";
- }
- $b .= "</tr>";
- }
- $b .= "</table>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement