Jump to content


Photo

Php/Java


  • Please log in to reply
1 reply to this topic

#1 mcmuney

mcmuney
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 08 March 2006 - 11:28 PM

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.

#2 lessthanthree

lessthanthree
  • Members
  • PipPipPip
  • Advanced Member
  • 85 posts
  • LocationUK

Posted 08 March 2006 - 11:43 PM

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"
call me a safe bet, i'm betting i'm not




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users