简体   繁体   English

如何在php中用字母数字值检查pdf字数?

[英]How to check pdf word count with alphanumeric value in php?

当我从pdf获取文本时,可能是编码问题。

I dont know exactly how this works, but with explode() and count() you can archieve something like that: 我不知道这是如何工作的,但是使用explode()count()可以归档类似的内容:

$words = count(explode(" ", $string));

Example: 例:

$string = "Hey i am 21 years old and 165 cm";
$words = count(explode(" ", $string));
echo $words; //returns 9

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM