indiana jones magical sentences - 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.

Name: indiana jones magical sentences fullscreencopydownloadembedprint


Your result can be seen below.

Result of php executing





Full code of indiana jones magical sentences.php

  1. <?php
  2.     $animals = ["Le singe", "Le serpent", "Le tigre"];
  3.     $elements = ["a l'eau", "au feu", " au vent"];
  4.     
  5.     function writeSecretSentence (string $animals, string $elements):array {
  6.         $arr = [];
  7.         forEach($animals as $animal) {
  8.             forEach($elements as $element) {
  9.                  $arr[] = $animal . "s'incline face " . $element . ".";
  10.             };
  11.         };
  12.         return $arr;
  13.     };
  14.     
  15.     forEach(writeSecretSentence($animals, $elements) as $sentence) {echo $sentence;};
  16. ?>
File Description
  • indiana jones magical sentences
  • PHP Code
  • 25 Sep-2022
  • 516 Bytes
You can Share it: