Citation :
$positions = array('01A', '01B', '01C', '01D', '01E', '01F', '01G', '01H', '01I', '01J');
foreach ($positions as $key => $position) {
if ($scenario == 'aleatoire' && strlen($data['GamerTag_' . $position]) > 0 &&
strlen($data['PseudoHFR_' . $position]) > 0) {
unset($positions[$key]);
}
}
if ($scenario == 'aleatoire') {
shuffle($positions);
$position = current($positions);
}
|