Advertisement
eimkasp

PHP basic komandos

Jul 16th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title></title>
  5. </head>
  6. <body>
  7.     <div class="labas">
  8.         <?php
  9.             $antraste = "Naujiena 1";
  10.             echo $antraste;
  11.         ?>
  12.         <?php
  13.             /*
  14.                 komentaras kaip javascripte,
  15.                 keliu eiluciu
  16.             */
  17.             // viena eilute
  18.  
  19.  
  20.             for($i = 0; $i < 3; $i++) {
  21.                 echo "<h1>";
  22.                 echo $antraste;
  23.                 echo "</h1>";
  24.             }
  25.         ?>
  26.     </div>
  27.  
  28.     <?php
  29.         $skaiciai = [291,1929491,294912,2959,1254,91, 91,19];
  30.  
  31.         $max = 0;
  32.         for($i = 0; $i < count($skaiciai); $i++) {
  33.             echo "<div>";
  34.             echo $skaiciai[$i];
  35.             echo "</div>";
  36.             if($max < $skaiciai[$i]) {
  37.                 $max = $skaiciai[$i];
  38.             }
  39.         }
  40.  
  41.         echo "Didziausias skaicius " . $max;
  42.     ?>
  43.  
  44.  
  45.     Visos teises saugomos <?php echo date("Y");
  46.  
  47.     ?>
  48.  
  49. </body>
  50. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement