how to find and replace the first word from the string using php
eg:
$str = 'Super World Hello World';
replace($str,'Hello','Hi');
expected result should be 'Super World Hello World' as it does not match with first word.
eg2:
$str = 'Hello World Hello World';
replace($str,'Hello','Hi');
expected result should be 'Hi World Hello World' as it does match with first word.
please help