foreach ($this->getGalleryImages() as $_image){
$a=explode('/',$_image->getPath());
$b=explode('-',$a[count($a)-1]);
$colors[]=$b[1];
}
为什么我不能更改$colors[]=$b[1]; 为$colors=$b[1];. 但这$color=array_unique($colors);没关系。$color 它没有[]($color[])