Source Code:
(back to article)
<?php $string = "I have an apple"; $string = preg_replace('/\bapple\b/', '', $string); echo $string; // Output: "I have an "
Result:
Report an issue