I'm building an application using PHP and I'm a beginner in systems development. How do I format the text fields to have the letters all uppercase?
I'm building an application using PHP and I'm a beginner in systems development. How do I format the text fields to have the letters all uppercase?
This is done with CSS:
div {
text-transform: uppercase;
}
example: link
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
Carlos, the formatting of texts is characteristic of FRONT-END language, such as html, css, javascript and others, in PHP the string function strtoupper ($ text) may be worth it, however the most correct form is CSS with the 'font-variant' argument bringing something like 'small-caps', you can have a class that returns all the text in small caps 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;}