2
如何將數組添加到數組?我想這:將數組添加到同一維數
for($i = 0; $i < sizeof($results); $i++)
{
$results[$i][] = array('test' => 'sdsa');
}
print_r($results);
但結果是這對每一個元素 - >
Array(
[0] => Array(
[playerid] => 0
[nickname] => Jeffrey_Westh
[score] => 2
[ping] => 123
[0] => Array (
[test] => sdsa
)
)
我和需要做出這樣的:
Array(
[0] => Array(
[playerid] => 0
[nickname] => Jeffrey_Westh
[score] => 2
[ping] => 123
[test] => sdsa
)