我有一些包含單詞LIMIT 3, 199
或LIMIT 0, 100
的字符串。PHP查找和字符串替換後?
基本上我想在我的字符串中替換單詞LIMIT和它之後的所有內容。
如何在PHP中執行此操作? str_replace函數只替換項目和限制的文字之後是動態/
所以它可能是
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
完整的例子嗎?會... – TheBlackBenzKid
@TheBlackBenzKid http://phpfiddle.org/main/gist/3981495 –
快樂與所有的答案。謝謝 – TheBlackBenzKid