1, "message" => "score_add_success" ); } else { $scores = Score::getScores(10); $scArray = array(); for($i = 0; $i < sizeof($scores); $i++) { array_push($scArray, array( "login" => utf8_encode($scores[$i]->getLogin()), "score" => $scores[$i]->getScore() )); } }