gpt4 book ai didi

php - 如何在 PHP 中替换字符串的一部分?

转载 作者:太空宇宙 更新时间:2023-11-04 12:44:12 24 4
gpt4 key购买 nike

<分区>

我正在尝试获取字符串的前 10 个字符,并想用 '_' 替换空格。

我有

  $text = substr($text, 0, 10);
$text = strtolower($text);

但我不确定下一步该做什么。

我要字符串

this is the test for string.

成为

this_is_th

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