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

  1. <?php
  2. $mod_div = array ("module 1" =>"L1_SEM","module2" =>"l1_S1",
  3. "module3"=>"l1_S2","module4"=>"l1_DSI","module5"=>"l2_DSI","module6"
  4. =>"l2_RSI","module7"=>"l3_SEM");
  5.     echo "le tableau a ". count($mod_div). "elements: <br/>"  ;
  6.  
  7.     
  8.         foreach ($mod_div as $valeur => $i)
  9.         {
  10.            echo "<ul><li>" .$valeur."-->" .$i.'<br/>'.'</li></ul>' ;
  11.         }
  12.         ?>
  13.        
  14.