我想知道是否可以将文本分成两部分。
在我的网站上,我有一个产品描述(500-1000字),我想像这样显示它:
<div class="text-col">
<?php echo nl2br($col1); ?>
</div>
<div class="text-col">
<?php echo nl2br($col2); ?>
</div>
像这样的东西吗?
$len = strlen($input);
$space = strrpos($input," ",-$len/2);
$col1 = substr($input,0,$space);
$col2 = substr($input,$space);
// now output it
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)