Вот вам код генерации планеты в зависимости от позиции. Выдран с новы 0.8с.
if ($Position == 1 || $Position == 2 || $Position == 3) {
$PlanetType = array('trocken');
$PlanetClass = array('planet');
$PlanetDesign = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10');
$planet['temp_min'] = rand(0, 100);
$planet['temp_max'] = $planet['temp_min'] + 40;
} elseif ($Position == 4 || $Position == 5 || $Position == 6) {
$PlanetType = array('dschjungel');
$PlanetClass = array('planet');
$PlanetDesign = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10');
$planet['temp_min'] = rand(-25, 75);
$planet['temp_max'] = $planet['temp_min'] + 40;
} elseif ($Position == 7 || $Position == 8 || $Position == 9) {
$PlanetType = array('normaltemp');
$PlanetClass = array('planet');
$PlanetDesign = array('01', '02', '03', '04', '05', '06', '07');
$planet['temp_min'] = rand(-50, 50);
$planet['temp_max'] = $planet['temp_min'] + 40;
} elseif ($Position == 10 || $Position == 11 || $Position == 12) {
$PlanetType = array('wasser');
$PlanetClass = array('planet');
$PlanetDesign = array('01', '02', '03', '04', '05', '06', '07', '08', '09');
$planet['temp_min'] = rand(-75, 25);
$planet['temp_max'] = $planet['temp_min'] + 40;
} elseif ($Position == 13 || $Position == 14 || $Position == 15) {
$PlanetType = array('eis');
$PlanetClass = array('planet');
$PlanetDesign = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10');
$planet['temp_min'] = rand(-100, 10);
$planet['temp_max'] = $planet['temp_min'] + 40;
} else {
$PlanetType = array('dschjungel', 'gas', 'normaltemp', 'trocken', 'wasser', 'wuesten', 'eis');
$PlanetClass = array('planet');
$PlanetDesign = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '00',);
$planet['temp_min'] = rand(-120, 10);
$planet['temp_max'] = $planet['temp_min'] + 40;
}