Thanks, that looks like a good tutorial. I'm a little confused, though. Suppose I want to apply this technique to the following database value:
Originally Posted by Vex
Do I insert the upper-case script BEFORE or AFTER the above script...and how/where do I plug in $r['Symbol']? Thanks.
<?php $Symbol = "The " . $r['Symbol']; ?>
// Converts $title to Title Case, and returns the result.
// Our array of 'small words' which shouldn't be capitalised if
// they aren't the first word. Add your own words to taste.
$smallwordsarray = array(
// Split the string into separate words
$words = explode(' ', $title);
foreach ($words as $key => $word)
// If this word is the first, or it's not one of our small words, capitalise it
// with ucwords().
if ($key == 0 or !in_array($word, $smallwordsarray))
$words[$key] = ucwords($word);
// Join the words back into a string
$newtitle = implode(' ', $words);
// CSS text-transform property