php - Uppercase first letter and rest lower -


ive been looking around way in php have string converted, first letter becomes uppercase , rest lower case.

at moment doing believe standard way:

ucfirst(strtolower($string)); 

but have found programming languages (ie. tcl) can 1 cammand:

totitle 

is there way in php? it's not problem such, i'm curios dude :d

thanks

function totitle($string){   return ucfirst(strtolower($string)); } 

and voila :)


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -