Ok ... this looks more dificult than i was thinking
it works well when used on a singel word or lines wher all words shal be capitalised
but if only the first word in sentens it gets dificult
for a text area i tryde this
PHP Code:
$infotext = ucfirst(trim($_POST["infotext"]));
works well except for special letters like æøå
so i tryde this
PHP Code:
$infotext = trim($_POST["infotext"]);
$infotext = substr($infotext,0,1);
$infotext = mb_convert_case($infotext, MB_CASE_TITLE, "utf-8");
well it will capitalise the first letter .. but æøå simply disapers

(and so dos the rest of the text, but that can be solvd with some extra code)
æø and å (and other special characters) is actualy 2letters/sign, so by looking at the 2 first insted of the first it actualy works
PHP Code:
$infotext = substr($infotext,0,2);
so i end up with this:
PHP Code:
$infotext = trim($_POST["infotext"]);
$infotext = mb_convert_case(substr($infotext,0,2), MB_CASE_TITLE, "utf-8").substr($infotext,2);
Testet with letters like æøåöäé
maby others can benifit of my strukel
(now ill try to se if i can get the 2 lines combind)