将逗号分隔的值更改为换行符

时间:2019-06-29 00:59:36

标签: php magento magento-2.3

phtml下面的[html]返回逗号分隔的值 如何将逗号更改为换行符?

<?php foreach ($_additional as $_data): ?>
    <tr>

        <th class="col label" scope="row"><?= $block->escapeHtml(__($_data['label'])) ?></th>
        <td class="col data" data-th="<?= $block->escapeHtml(__($_data['label'])) ?>"><?= /* @escapeNotVerified */ 
        $_helper->productAttribute($_product, $_data['value'], $_data['code'])
        ?>
        </td>
    </tr>
<?php endforeach; ?>

0 个答案:

没有答案