bucket_list_friends - 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.php
- <?php
- $getal = readline("Hoeveel vrienden zal ik vragen om hun droom?" . PHP_EOL);
- if (!is_numeric($getal)) {
- exit("'$getal'is geen getal, probeer het opnieuw" . PHP_EOL);
- } else {
- echo "Wat is jou naam?" . PHP_EOL;
- echo "Wat is jou droom?" . PHP_EOL;
- $vriend_1 = readline('');
- $vriend_1 = array()
- $dromen[$i] = ['naam' => $naam, 'droom' => $droom];
- for ($i = 0; $i < $getal; $i++) {
- $dromen[] = readline("Wat is jou droom?" . PHP_EOL);
- }
- echo $naam . "heeft dit als zijn droom:" . $droom . PHP_EOL;
- for ($i = 0; $i < $getal; $i++) {
- echo $droom[$i] . PHP_EOL;
- }
File Description
- bucket_list_friends
- PHP Code
- 20 Sep-2021
- 602 Bytes
You can Share it:
Latest PHP Pastes