【发布时间】:2016-10-24 13:08:13
【问题描述】:
我想统计 Microsoft Word 等文本中的字符数。
<p><b>Lorem Ipsum</b> is simply dummy text of the printing and typesetting industry.Tom's farm. 12th century.</p>
12th -> 'th' 是一个特殊字符,在数字 12 之下。
如何在 PHP 中做到这一点?
【问题讨论】:
-
去掉标签和空格然后计数。我不明白你对
th和12的意思。示例:eval.in/665455. -
我无法完全理解您的问题。你能举个例子吗?
-
为什么要使用 php 做这么简单的事情?您可以改用 Jquery。 PHP 服务器端脚本有时你不必用 php 做类似这样的简单事情