test - 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 test.php

  1. <?php
  2.  
  3. <?php
  4. $arr = [
  5.   [
  6.     'name' => 'Альбина', 
  7.     'age' => '37'
  8.   ],
  9.   [
  10.     'name' => 'Марина', 
  11.     'age' => '47'
  12.   ],
  13.   [
  14.     'name' => 'Лера', 
  15.     'age' => '27'
  16.   ],
  17.   [
  18.     'name' => 'Эля', 
  19.     'age' => '36'
  20.   ],
  21.   [
  22.     'name' => 'Гуля', 
  23.     'age' => '38'
  24.   ],
  25.   [
  26.     'name' => 'Лена', 
  27.     'age' => '20'
  28.   ]  
  29. ];
  30. foreach ($arr as $value) {
  31.  echo $value['age'].PHP_EOL;
  32. }
  33.  
File Description
  • test
  • PHP Code
  • 28 Jun-2022
  • 416 Bytes
You can Share it: