1
我正在編寫一個腳本來將產品導出到Google Base ......問題在於,當我使用下面的代碼時in stock
被輸出爲"in stock"
而Google不認識它,只承認沒有引號。我不知道如何在沒有引用的情況下做到這一點。fputcsv把報價放在不應該的地方
$row = array(
'new',
$product->getSku().'-'.$vehicle->getId(),
'https://www.domain.com/vehicles/'.str_replace(' ', '-', $make->getName()).'/'.str_replace(' ', '-', $model->getName()).'/'.$year.'/'.$product->getId(),
$this->tru->config->get('root.cdn.url').'-products/'.$product->getPicture(),
$product->getSellPrice(),
$title,
$year,
'in stock',
$product->getFCCID(),
'Visa,Mastercard,Discover,AmericanExpress',
'US::Ground:4.95,CA::Ground:28.95',
'small',
'Vehicles & Parts > Automotive Locking Systems > Remote Keyless Systems'
);
fputcsv($output, $row, $seperatorValue);
有什麼$ seperatorValue的值?如果在$ row數組中使用雙引號而不是單引號,會發生什麼? – 2011-01-28 16:48:35