I have code:
<?php echo strftime("%Y %B %e, %A")?>
In some languages I get:
2012 junio 3, domingo
I want that first letter of all words would be uppercase (capital), so it would look like:
2012 Junio 3, Domingo
I didn't find any answer in internet, does anybody have an idea? :)
The ucfirst() function converts the first character of a string to uppercase. Related functions: lcfirst() - converts the first character of a string to lowercase. ucwords() - converts the first character of each word in a string to uppercase.
To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.
The toUpperCase() method converts the string to uppercase.
Try echo ucwords(strftime("%Y %B %e, %A"));
http://php.net/manual/en/function.ucwords.php
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