We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

uppercase or lowercase

Hi I want to know how to change the data to uppercase or lowercase, remove all characters or letters or digits, I was reading

https://docs.phalcon.io/en/latest/api/Phalcon_Filter.html#methods

but someone can help me with an example of a case-insensitive in a form with phtml

Data where? In what context?

Also, sanitization will only remove invalid characters not replace them



81.2k

Really, how to convert a string to uppercase?



77.7k
Accepted
answer
edited Jul '16
$str = 'FooBar';
$upper = mb_strtoupper($str);
echo $upper; // FOOBAR