repl.it
@jonathanbell/

Full Assets Mentors/Mentees 2

PHP CLI

No description

fork
loading
Files
  • main.php
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

$full_assets_members = [
  'Jonathan',
  'Ben',
  'Joseph',
  'Thummal',
  'Susan', 
];

$full_assets_members_keys = array_keys($full_assets_members);
shuffle($full_assets_members_keys);

echo PHP_EOL.'-------- Pairs --------'.PHP_EOL.PHP_EOL;

$i = count($full_assets_members) - 1;
while ($i > -1) {
  print 'Mentor: '.$full_assets_members[$full_assets_members_keys[$i]].' | Mentee: ';
  $i--;

  if (isset($full_assets_members[$i])) {
    print $full_assets_members[$full_assets_members_keys[$i]];
    $i--;
  } else {
    print 'Nobody this sprint ☹️';
  }

  print PHP_EOL;
}

print PHP_EOL;
Fetching token
?