3
I am building an application using PHP and I am beginner in systems development. How do I format the text fields for all uppercase letters?
3
I am building an application using PHP and I am beginner in systems development. How do I format the text fields for all uppercase letters?
5
This is done with CSS:
div {
text-transform: uppercase;
}
example: https://jsfiddle.net/rhzykegg/
If you really want to do it in PHP you can use strtoupper for ISO-8859-1
and mb_strtoupper for UTF8
echo strtoupper('Texto'); // dá TEXTO
0
Carlos, the formatting of text is proper FRONT-END language, like html, css, javascript and others, in PHP the function of string strtoupper($text) can help you, but the most correct way is up to CSS with the argument 'font-Variant' bringing something like 'small-caps', you can have a class that returns all the text in versalete for example.
You can have the same effect in javascript:
getElementByTagName("INPUT").style.fontVariant="small-caps";
<input type="text" value="default text" class="versalete" />
in css:
.versalete{font-variant:small-caps;}
Browser other questions tagged css html5
You are not signed in. Login or sign up in order to post.
legal extra code information, but typographically, uppercase and small-caps are completely different things. Uppercase causes all letters to be uppercase (shape and size). Small-caps causes lower case letters to be displayed in upper case and lower case size (x-height).
– Bacco