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.
Result of php executing
Full code of exam.php
- <?php
- $gyventojai = array(
- "1959" => 90,
- "1970" => 169,
- "1979" => 125,
- "1989" => 213,
- "2001" => 183,
- "2011" => 144);
- $metai = array(
- "90" => 1959,
- "169" => 1970,
- "125" => 1979,
- "213" => 1989,
- "183" => 2001,
- "144" => 2011);
- echo " Salos miestelio gyventoju skaiciaus kitimas per ilga laikotarpi:";
- echo "<br>";
- foreach( $gyventojai as $metai => $value) {
- echo "$metai metais Salose gyveno zmoniu - $value <br />";
- }
- echo "<br>";
- $pavadinimas = array(
- "1966" => "Odds On",
- "1967" => "Scratch One",
- "1968" => "Easy Go",
- "1969" => "The Venom Business",
- "1970" => "Drug of Choice",
- "1972" => "Binary");
- $kitimetai = array(
- "1" => 1966,
- "2" => 1967,
- "3" => 1968,
- "4" => 1969,
- "5" => 1970,
- "6" => 1972);
- echo " Michael Crichton per savo karjera yra sukures siuos filmus:";
- echo "<br>";
- foreach( $pavadinimas as $kitimetai => $value) {
- echo "$kitimetai metais isleido filma $value <br />";
- }
- ?>