我有2頁。多維Javascript列表到PHP頁面
berechnungseingabe.php
,我產生一個多維的JavaScript Array
Array[19]
3: Array[0]
7: Array[0]
11: Array[0]
Anzahl: "1"
Driving: 2380
Index: "13"
Latitude: 48.0078390267396
Longitude: 16.224982738494873
Walking: 1647
13: Array[0]
14: Array[0]
...
x: Array[0]
當我在按鈕chlick
<button class="ui-btn ui-corner-all ui-btn-icon-left ui-shadow ui-icon-action" onclick="berechnenDerWege()">Berechnen</button>
我想送數組的
berechnungsergebniss.php
,我可以在此頁面上使用它作爲php數組。
jQuery,JavaScript,PHP有沒有辦法?
JSON.stringify(array);
不工作,因爲我得到:
[[],空,[],NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, []]
作爲結果。
聽過[**'$的。 ajax' **](http://api.jquery.com/jquery.ajax/) –
是的,但我不知道如何做到這一點$ .ajak。你可以給我發一個代碼示例嗎?請求 – Phil