List piemērs - 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 List piemērs.php

  1. <?php
  2.     $myList = [
  3.         'This',
  4.         'is',
  5.         'a',
  6.         'lot',
  7.         'of',
  8.         'seperate',
  9.         'list',
  10.         'items',
  11.         'and',
  12.         'you',
  13.         'can',
  14.         'add',
  15.         'any',
  16.         'extra',
  17.         'how',
  18.         'mutch',
  19.         'you',
  20.         'want',
  21.     ];
  22.     echo '<ul>';
  23.     foreach($myList as $oneItem) {
  24.         echo '<li>'.$oneItem.'</li>';
  25.     }
  26.     echo '</ul>';
  27. ?>
File Description
  • List piemērs
  • PHP Code
  • 15 Sep-2021
  • 425 Bytes
You can Share it: