I want to replace all words first character uppercase. I can do this with ucwords but its not unicode encoding. also i need to set delimiters.
this is the, sample text.for replace the each words in, this'text sample' words
I want this text convert to
This İs The, Sample Text.For Replace The Each Words İn, This'Text Sample' Words
After comma, after dot, after space, after comma(not space), after dot(not space)
How can i convert to upper characters with utf-8, Thanks.
https://eval.in/485321
ucwords()
is a built-in function for this specific problem. You have to set your own delimiters as its second argument:
echo ucwords(strtolower($string), '\',. ');
Outputs:
This Is The, Sample Text.For Replace The Each Words In, This'Text Sample' Words
For this use mb_convert_case
with second parameter MB_CASE_TITLE
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With