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

  1. <?php
  2.  
  3. $aantal = readline("Hoeveel activiteiten wil je toevoegen? . PHP_EOL");
  4. if (is_numeric($aantal)) {
  5.     "$aantal >= 0";
  6. } else { 
  7.     exit("'" . $aantal . "' geen getal ingevoerd" . PHP_EOL);
  8. }
  9.  
  10. $type1 = readline("Wat wil je toevoegen aan jou bucketlist?" . PHP_EOL);
  11.  
  12. for ($i = 0; $i < count($aantal); $i++) {
  13.     echo $type1[$i] . PHP_EOL;
  14. }
  15. $type = array("");
  16.  
File Description
  • bucket_list1
  • PHP Code
  • 15 Sep-2021
  • 384 Bytes
You can Share it: