Write a PHP script, which changes the color of the first character of a word.
<?php $text = 'PHP Tutorial'; $text = preg_replace('/(\b[a-z])/i','<span style="color:red;">\1</span>',$text); echo $text; ?>
Sample Output:
PHP Tutorial
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