Re: Capitalizing the first letter

From: Date: Tue, 13 Mar 2007 14:13:17 +0000
Subject: Re: Capitalizing the first letter
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-250420@lists.php.net to get a copy of this message
Todd Cary wrote:
I would like to write a filter that takes the text "smith" or "SMith" and returns "Smith"; same for "ralph smith". Is the a good source on using filters this way?
<?php
    $txt = "ralph SMith";
    $txt = ucwords(strtolower($txt));
?>
Thank you...
You're welcome. -Stut

« previous php.general (#250420) next »