Problem Description
I want a version of `str_replace()` that only replaces the first occurrence of `$search` in the `$subject`. Is there an easy solution to this, or do I need a hacky solution?
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?