【发布时间】:2025-11-23 13:20:04
【问题描述】:
目前我在. 爆炸了一个字符串,它可以按我喜欢的方式工作。唯一的问题是,当. 作为小数点出现时,它也会爆炸。有没有办法从爆炸功能中排除decimal 点?
我目前的设置:
如您所见,它在两个数字之间的. 处爆炸
$String = "This is a string.It will split at the previous point and the next one.Here 7.9 is a number";
$NewString = explode('.', $String);
print_r($NewString);
output
Array (
[0] => This is a string
[1] => It will split at the previous point and the next one
[2] => Here 7
[3] => 9 is a number
)
【问题讨论】: