exam - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of exam.php

  1.       <?php
  2.          $gyventojai = array(
  3.              "1959" => 90,
  4.              "1970" => 169,
  5.              "1979" => 125,
  6.              "1989" => 213,
  7.              "2001" => 183,
  8.              "2011" => 144);
  9.              
  10.              $metai = array(
  11.              "90" => 1959,
  12.              "169" => 1970,
  13.              "125" => 1979,
  14.              "213" => 1989,
  15.              "183" => 2001,
  16.              "144" => 2011);
  17.          
  18.         echo " Salos miestelio gyventoju skaiciaus kitimas per ilga laikotarpi:";
  19.         echo "<br>";
  20.         foreach( $gyventojai as $metai => $value) {
  21.             echo "$metai metais Salose gyveno zmoniu - $value <br />";
  22.          }
  23.         
  24.         echo "<br>";
  25.         
  26.         $pavadinimas = array(
  27.              "1966" => "Odds On",
  28.              "1967" => "Scratch One",
  29.              "1968" => "Easy Go",
  30.              "1969" => "The Venom Business",
  31.              "1970" => "Drug of Choice",
  32.              "1972" => "Binary");
  33.              
  34.              $kitimetai = array(
  35.              "1" => 1966,
  36.              "2" => 1967,
  37.              "3" => 1968,
  38.              "4" => 1969,
  39.              "5" => 1970,
  40.              "6" => 1972);
  41.          
  42.         echo " Michael Crichton per savo karjera yra sukures siuos filmus:";
  43.         echo "<br>";
  44.         foreach( $pavadinimas as $kitimetai => $value) {
  45.             echo "$kitimetai metais isleido filma $value <br />";
  46.          }
  47.       ?>
File Description
  • exam
  • PHP Code
  • 22 Jan-2021
  • 1.38 Kb
You can Share it: