Re: ucwords() usage QUICKIE

From: Date: Mon, 17 Jun 2002 20:58:26 +0000
Subject: Re: ucwords() usage QUICKIE
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102602@lists.php.net to get a copy of this message
ucwords() is a function. You must assign what it returns to a variable. ucwords($sql); will work. It'll capitalize each word of $sql. However, you don't save the result anywhere, so it's lost... ---John Holmes... ----- Original Message ----- From: "Daniel Negron/KBE" <danegron@kbelectronics.net> To: "1LT John W. Holmes" <holmes072000@charter.net> Cc: <php-general@lists.php.net> Sent: Monday, June 17, 2002 9:32 AM Subject: Re: [PHP] ucwords() usage QUICKIE You WROTE : You pass a string to the function and it returns a string with each word starting with an uppercase. $string = "hello world"; $new_string = ucwords($string); echo $new_string; // Displays 'Hello World' Reply: So does that mean that I can not take all of the selected strings and capitolize each word like so, ucwords($sql) or do I have to specify each string to be converted prior to being inserted into the database $newstr = ucwords($oldstr) ?? Thank You <><><><><><><><><><><><><><><><> Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com <><><><><><><><><><><><><><><><> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#102602) next »