teamsgen - 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 teamsgen.php
- <?php
- $array = ["Ad1yar","bqtk0vdev","Artemida","NikitaBlack",'Amirka',"Daniluk"];
- $teams = [];
- $count = 0;
- shuffle($array);
- foreach($array as $ok){
- $teams[$count/2][] = $ok;
- $count++;
- }
- $count = 1;
- foreach($teams as $team){
- print("Team {$count}: ".implode(" & ", $teams[$count-1])."\n");
- $count++;
- }
File Description
- teamsgen
- PHP Code
- 03 Feb-2023
- 316 Bytes
You can Share it:
Latest PHP Pastes