Advertisement
Kiporralixo

Untitled

Mar 2nd, 2019
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. <style>
  2.     table{
  3.         display: block;
  4.         width:1000px;
  5.         min-height: 100px;
  6.         position: relative;
  7.         overflow: hidden;
  8.         margin: auto;
  9.         margin-top: 50px;
  10.     }
  11.     .nome{
  12.         display: inline-block;
  13.         width:400px;
  14.         border: 2px solid black;
  15.     }.numero{
  16.         display: inline-block;
  17.         width:80px;
  18.         margin-left: 5px;
  19.         border: 2px solid black;
  20.         text-align: right;
  21.        
  22.        
  23.     }
  24. </style>
  25.    
  26. <?php
  27.  
  28.  
  29. $eachLine = explode(PHP_EOL, $detalhamento);
  30.  
  31. $b = "<table>";
  32.  
  33. foreach ($eachLine as $line) {
  34.  
  35.     $c = preg_split('/\s+/', $line);
  36.  
  37.     $b .= "<tr>";
  38.  
  39.     foreach ($c as $lines) {
  40.          $b .= "<td class='nome'>" . $lines[0] . "</td>";
  41.          $b .= "<td class='numero'>" . $lines[1] . "</td>";
  42.          $b .= "<td class='numero'>" . $lines[2] . "</td>";
  43.          $b .= "<td class='numero'>" . $lines[3] . "</td>";
  44.     }
  45.  
  46.     $b .= "</tr>";
  47. }
  48.  
  49. $b .= "</table>";
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement