Posted By

Wardy on 12/05/08


php text capitalise

Versions (?)

Who likes this?

3 people have marked this snippet as a favorite


php - Capitalise First Letter of Words

 / Published in: PHP


First Remove all capital letters, then capitalise the first ones in each word.

  1. echo ucfirst (strtolower('FROGS EAT DOGS ON LOGS.')); # outputs: Frogs eat dogs on logs.

Report this snippet  


RSS Icon Subscribe to comments
Posted By: pgl on December 6, 2008

See also:

Posted By: iloveitaly on May 29, 2009

What would be nice is a function that capitalized a title (ie didn't capitalize words like a, to, the, etc).

Posted By: Jacky888 on August 5, 2018

how to install twrp recovery on lg g3 twrprecoveryapp

You need to login to post a comment.