$status = array(' (gu)', ' (u)', ' (iu)', ' (i)', ' (g)', ' (ig)', ' (p)', ' (ip)', ' (pi)');
$sunsystem = explode("\n", $sunsystem);
for($i=0; $i<count($sunsystem); $i++){
$planet = explode("\t",$sunsystem[$i]);
if($planet[4]!=" "){
$_return[$i+1][isplayer] = 1;
$_return[$i+1][alli] = trim($planet[2]);
$player = $planet[4];
for($j=0; $j<count($status); $j++){
$player = str_replace($status[$j],'',$player);
}
$_return[$i+1][spieler] = trim($player);
$_return[$i+1][planetenname] = trim($planet[3]);
}else{
$_return[$i+1][isplayer] = 0;
}
}
return $_return;
}