Write a PHP script to replace the first 'the' of the following string with 'That'.
Sample date: 'the quick brown fox jumps over the lazy dog.'
<?php $str = 'the quick brown fox jumps over the lazy dog.'; echo preg_replace('/the/', 'That', $str, 1)."\n"; ?>
Sample Output:
That quick brown fox jumps over the lazy dog.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer