我有一些包含单词LIMIT 3, 199
or的字符串LIMIT 0, 100
。
基本上我想在我的字符串中替换单词 LIMIT 和它后面的所有内容。
我如何在 PHP 中做到这一点?str_replace 只替换一个项目,之后的 LIMIT 文本是动态的/
所以它可能是
WHEN JOHN WAS TRYING HIS SQL QUERY, HE FOUND THAT LIMIT, 121
// RETURN WOULD BE
WHEN JOHN WAS TRYING HIS SQL QUERY, HE FOUND THAT
WHEN JOHN TRIED LIMIT 343, 333 HE FOUND
// RETURN WOULD BE
WHEN JOHN TRIED