1до20 - 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 1до20.php

  1. <?php
  2. echo "<pre/>";
  3. $a = range(10,20);
  4. $b = range(1,10);
  5. $mix1 = array();
  6. $mix2 = array();
  7.     foreach ($a as $v){
  8.         $mix1[] = $v*$v;
  9.         
  10.     }
  11.     foreach($b as $v){
  12.         $mix2[] = $v*$v*$v;
  13.     }
  14.     $original = array_merge($mix1,$mix2);
  15.     print_r($original);
  16.     
  17.     ?>
  18.  
File Description
  • 1до20
  • PHP Code
  • 20 Oct-2021
  • 291 Bytes
You can Share it: