I am looking to convert the first word of a sentence into uppercase but unsure how would I go about it. This is what I have so far:
$o = "";
if((preg_match("/ibm/i", $m)) || (preg_match("/hpspecial/i", $m))) {
$o = strtoupper($m);
} else {
$o = ucwords(strtolower($m));
}
I would like to use uppercase
from the hpspecial
ID where HP is the first part of the sentence to be capitalized, but this will uppercase the whole sentence. How do I only make HP of the sentence uppercase?