如何在索引

时间:2015-06-08 13:59:37

标签: php

我有这段代码

foreach($GetJobResult->Components->Component as $component_index=>$component) {
   $quote_title= ($component_index+1).') '.$component->Title."\n";
   //var_dump($component_index+1);
   //die();

   if(isset($component->Paper->Family)) {
      if(isset($component->Paper->Type) && isset($component->Paper->Color)) {
         $getPaperInfoResult=$ws->getPaperInfo($component->Paper->Family,$component->Paper->Type);

         $quote_desc = $getPaperInfoResult->PapFamType[$component_index+1]->Lfam.' - '.$getPaperInfoResult->PapFamType[$component_index+1]->Lcoul.' - '.$getPaperInfoResult->PapFamType[$component_index+1]-> Gramm.' g/m2'."\n";
         var_dump($quote_desc); 
      }
   }
}

如何在带有索引的表格上存储$quote_desc以获取所有信息? 当我输出var_dump($quote_desc);时,我有三行但是当我对变量有影响时,我发现了最后一行。

var_dump($quote_desc);
string 'Couché Moderne Mat - IVOIRE NATUREL - 250 g/m2' (length=48)
string 'Couché Moderne Mat - BLANC - 350 g/m2' (length=39)
string 'ADHESIF BRILLANT - BLANC - 80 g/m2'

提前致谢

0 个答案:

没有答案