この PHP 配列を必要な文字列形式に変換するのに苦労しています。
$result = mysql_query($query) or die(mysql_error());
$result1 = array();
while($row = mysql_fetch_array($result)){
$result1[strtotime($row['DOB'])][strtotime($row['DOB'])] = strtotime($row['DOB']);
$result1[strtotime($row['DOB'])]['PRICE'] += $row['PRICE'];
}
print_r($result1);
現在の出力は次のとおりです。
[1136246400] => Array
(
[1136246400] => 1136246400
[PRICE] => 165.5
)
[1136332800] => Array
(
[1136332800] => 1136332800
[PRICE] => 169.5
)
そして、私はそれが必要です:
Array ( [0] => [1136246400, 165.5] [1] => [1136332800, 169.5] )
PHP の初心者 - どんな助けでも大歓迎です。ありがとう。