Re: Capitalization of variable

From: Date: Thu, 19 Jun 2008 04:32:48 +0000
Subject: Re: Capitalization of variable
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-275561@lists.php.net to get a copy of this message
you could explode the string by the " " space, then use the ucword function walking through the array, then implode http://www.php.net/manual/en/function.explode.php http://www.php.net/manual/en/function.ucwords.php http://www.php.net/manual/en/function.array-walk.php http://www.php.net/manual/en/function.implode.php others: http://www.php.net/manual/en/function.ucfirst.php http://www.php.net/manual/en/ref.strings.php Dmitrii Varvashenia wrote:
2008/6/19 Ron Piggott <ron.php@actsministries.org>:
How would I do this for a street address? If the user gave me their address as "12 george street" I would like the results to be 12 George Street.
    
For web I use CSS: text-transform:capitalize;


« previous php.general (#275561) next »