Write a PHP script to replace the first 'the' of the following string with 'That'
- برمجة بي اتش بي
- 2021-09-10
- mhanasmh00489829403
الأجوبة
<?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.