0
所以我試圖在一箇中心php文件中集中產品,並讓我的客戶端PHP只是請求信息,所以我只需編輯中心php文件來添加和刪除產品將php數組的部分提取到客戶端
我的服務器端
$varProduct= (
// [0] [1] [2] [3 4 5 6 7] [8]
array("Title" , 0001 , 100, 0,0,1,1,0, "/womens/tops/s/2.png", "/womens/tops/s/2.jpg", "/womens/tops/s/2.jpg", 50 )
)
在我的HTML客戶端我要顯示的標題,價格[2]和URL [8] 基本上
for(i=o, i< $varProduct.length(), i++){
//display $varProduct[i][0];
//display the Image for $varProduct[i][8];
//display $varProduct[i][2];
}
我怎麼能在我的客戶端在我的服務器端文件中的值在HTML標籤內?我需要以內聯方式顯示它們,才能夠格式化變量?
我需要用捲曲的話,我會更新的答案等待 –
@RyanWilliams OP「試試這個」?請添加一個解釋,你做了什麼,爲什麼你這樣做,不僅是爲了OP,而且是爲了未來的訪問者。 –
@RyanWilliams現在檢查 –