Emphasizing first letter of string?
| From: | Micky Hulse | Date: | Tue, 22 Aug 2006 10:45:25 +0000 |
| Subject: | Emphasizing first letter of string? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-240979@lists.php.net to get a copy of this message | ||
Hi,
It is getting late, and I do not think I am thinking clearly...
What would be the best way to wrap <em></em> tag around the first letter of a string?
I know it has to be a combination of str_replace() and substr(), but due to my level of sleepiness I am having a lot of trouble working this one out...
Basically, if a config variable == true I want my script to loop through an array of strings and emphasize the first letter of each string.
Make sense? Sorry, I am pretty sleepy... Hmmm, I am betting I will discover the answer as soon as I send this email. :D
Anyway, any help would be great!
Cheers,
Micky