如何編輯“風”數組?例如,我希望速度為“3”?$forecast = [ "temperature" => "", "precipitation" => array("min-value", "max-value"), "wind" => [ "speed" => "", "side" => "", ]];
1 回答

犯罪嫌疑人X
TA貢獻2080條經驗 獲得超4個贊
您可以通過以下方法修改數組:
$forecast['temperature'] = 100500
$forecast['wind']['speed'] = 3
你也可以從數組中獲取數據:
$temperature = $forecast['temperature'];
$speed = $forecast['wind']['speed']
- 1 回答
- 0 關注
- 155 瀏覽
添加回答
舉報
0/150
提交
取消