- print_r: documentation ( source)
<?php
Ok ("test", array("1" => 5, "0" => 5));
function Ok($login, $scores) {
$outScores = array();
echo "first\n";
print_r($scores);
foreach ($scores as $id => $score) {
echo "$id => $val \n";
$outScores[] = array("PlayerId" => intval($id), "Score" => intval($score));
}
echo "final \n";
print_r($outScores);
}