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

  1. <html>
  2. <head>
  3.     
  4. </head>    
  5. <body>
  6.     <?php
  7.  
  8. $miArray = [1,2,3,4,5,6,7,8,9,10];
  9.  
  10. foreach($miArray as &$valor){
  11.     $valor = $valor * 3;
  12.     echo $valor . "<br />";
  13.     unset($valor);
  14. }
  15.  
  16. foreach ($miArray as $valor){
  17.     echo $valor . "<br />";
  18. }
  19. ?>
  20. </body>
  21. </html>
  22.  
  23.  
File Description
  • Example
  • PHP Code
  • 14 Oct-2021
  • 270 Bytes
You can Share it: