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