count_words
用于计算变量内容有多少个单词。
Example 5.7. count_words
<?php $smarty->assign('articleTitle', 'Dealers Will Hear Car Talk at Noon.'); ?>
模板是:
{$articleTitle} {$articleTitle|count_words}
输出:
Dealers Will Hear Car Talk at Noon. 7
以上内容是否对您有帮助:
W3Cschool
恭喜您成为首批注册用户
获得88经验值奖励
用于计算变量内容有多少个单词。
Example 5.7. count_words
<?php $smarty->assign('articleTitle', 'Dealers Will Hear Car Talk at Noon.'); ?>
模板是:
{$articleTitle} {$articleTitle|count_words}
输出:
Dealers Will Hear Car Talk at Noon. 7
Copyright©2021 w3cschool编程狮|闽ICP备15016281号-3|闽公网安备35020302033924号
违法和不良信息举报电话:173-0602-2364|举报邮箱:jubao@eeedong.com
扫描二维码
下载编程狮App
编程狮公众号
联系方式:
更多建议: