Laravel 8 Str::replaceArray() {#collection-method}
2021-07-19 10:28 更新
Str::replaceArray
函数使用数组顺序替换字符串中的给定值:
use Illuminate\Support\Str;
$string = 'The event will take place between ? and ?';
$replaced = Str::replaceArray('?', ['8:30', '9:00'], $string);
// 活动将在 8:30 至 9:00 之间进行
以上内容是否对您有帮助:
更多建议: