【发布时间】:2023-03-26 21:14:01
【问题描述】:
我在 php 中有一个这样的字符串:
$string = "Count the character frequency of this string";
当我使用爆炸功能时,输出显示为:
Array (
[0] => Count
[1] => the
[2] => character
[3] => frequency
[4] => of
[5] => this
[6] => string
)
但上面的输出并不让我满意,因为我想实现如下所示的输出:
Array (
[0] => C
[1] => o
[2] => u
[3] => n
[4] => t
[5] => t
[6] => h
[7] => e
[8] => c
[9] => h
[10] => a
[11] => r
[12] => a
[13] => c
)
我想用字母炸掉它们。
我的问题:有可能这样做吗?如果是的话,有什么建议。在此先感谢
【问题讨论】:
-
几个例子here.......