-5
$hello_world = $this->session->all_userdata();
foreach($hello_world as $key=>$product_id)
{
$query['products'] = $this->Global_products->globalFindProductsViewed($product_id);
foreach($query['products'] as $product)
{
$ryan[] = $product->name;
}
}
foreach($ryan as $r)
{
echo json_encode(array($r));
}
然後輸出看起來像這樣: [「高山50W×4的Apple®的iPod ®準備在短跑CD甲板「]
我知道我不能用JavaScript訪問此。 有人可以建議我怎麼做這項工作?
輸出看起來好像沒什麼問題。你認爲這個問題是什麼? –
我想我會通過ajax訪問它有問題 –
你*認爲*?你甚至*嘗試*? –