Jump to content

Archived

This topic is now archived and is closed to further replies.

mcmuney

Php/Java

Recommended Posts

Sorry if this is all java, need a quick solution. What's the code to capitalize? For example, if someone enters, "uNited", it should change to "United":

this.value.toCapLowerCase();

Thanks.

Share this post


Link to post
Share on other sites
If I understand correctly, you are looking for the php equivalent?

$rtn = ucfirst(strtolower("uNited")); // would return "United"

of course it can be done with vars

$text = "uNited";
$rtn = ucfirst(strtolower($text)); //would also return "United"

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.