gpt4 book ai didi

php - 如何在 PHP 中删除部分字符串?

转载 作者:IT老高 更新时间:2023-10-28 11:44:44 26 4
gpt4 key购买 nike

如何删除部分字符串?

示例字符串:"REGISTER 11223344 here"

如何从上述示例字符串中删除 "11223344"

最佳答案

如果您专门针对“11223344”,请使用 str_replace :

// str_replace($search, $replace, $subject)
echo str_replace("11223344", "","REGISTER 11223344 here");

关于php - 如何在 PHP 中删除部分字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2192170/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com