mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
16 lines
385 B
PHP
16 lines
385 B
PHP
<?php
|
|
if (!function_exists('show_goods_spec')) {
|
|
/**
|
|
* 商品规格过滤显示
|
|
* @param string $spec 原规格内容
|
|
* @return string
|
|
*/
|
|
function show_goods_spec(string $spec): string
|
|
{
|
|
$specs = [];
|
|
foreach (explode(';;', $spec) as $sp) {
|
|
$specs[] = explode('::', $sp)[1];
|
|
}
|
|
return join(' ', $specs);
|
|
}
|
|
} |