Forum Moderators: coopster
$tag2 = ucfirst(explode(' ', $tag1[0])[0]);
$tag2 = ucfirst(array_shift(explode(' ', $tag1[0])));
// Strict Standards: Only variables should be passed by reference ... $tag2 = preg_replace('/(\S+)\s.*/e', "ucfirst('$1')", trim($tag1[0]));