我有这段代码:
$category = $product->category;
if(!empty($category->category_id)){
$category = [$category->parent->title,$category->title];
}
它给出的结果如下:
Default Category first level category
我想要的是在>
和Default Category
之间添加first level category
我该怎么做?