bucket_list_friends aangepast - 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.
Result of php executing
Full code of bucket_list_friends aangepast .php
- <?php
- $input = readline("Hoeveel vrienden zal ik vragen om hun droom?" . PHP_EOL);
- if (is_numeric($input) == false) {
- exit("($input) is geen getal, probeer het opnieuw");
- }
- $array = [];
- for ($i = 1; $i <= ($input); $i++) {
- $naam_key =readline("Wat is jouw naam?");
- $droom_value = readline("Wat is jouw droom?");
- $array += [$naam_key => $droom_value];
- }
- foreach ($array as $key => $value) {
- echo $key . ' heeft dit als droom: ' . $value . PHP_EOL;
- }
- ?>
File Description
- bucket_list_friends aangepast
- PHP Code
- 20 Sep-2021
- 476 Bytes
You can Share it:
Latest PHP Pastes