Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 在字符串中分隔以空格分隔的单词
如何拆分字符串例如:“test 12.45”作为测试和 12.45 使用 php?
你试过这个explode()功能吗?
explode()
$text = "test 12.45"; $words = explode(" ",$text); echo $words[0]; echo $words[1];