我有兩個預先存在的變量:PHP在變量名使用可變
$side
(其是F或B)
和
$plate
(這是一個3位數字)
我試圖建立兩個數組稱爲
$sidecountF
和 $sidecountB
下面的代碼:
$sidecount{$side}[$plate] = 1;
假設$一邊是F和$板是200,我希望最終的結果是,
$sidecountF[200] = 1;
我,一開始,聲明sidecountF
和sidecountB
作爲陣列,
$sidecountF = array();
$sidecountB = array();
所以現在我很爲難。
你到底在問什麼?你的代碼看起來是正確的。 – Webnet 2010-08-19 14:39:37
對不起,我沒有留下一個句子。 – Screevo 2010-08-19 14:42:29