Re: ucwords() usage QUICKIE

From: Date: Fri, 14 Jun 2002 21:18:51 +0000
Subject: Re: ucwords() usage QUICKIE
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102272@lists.php.net to get a copy of this message
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' ---John Holmes... ----- Original Message ----- From: "Daniel Negron/KBE" <danegron@kbelectronics.net> To: <php-general@lists.php.net> Sent: Friday, June 14, 2002 5:06 PM Subject: [PHP] ucwords() usage QUICKIE > Hi All, > > I am trying to figure out how to use ucwords here : > if (submit) > $db = mysql_connect($dbhost,$dbuname,$dbpass); > mysql_select_db($dbname,$db); > ucwords($sql) <<<<< Is this correct ? > $sql = "INSERT INTO $prefix"; > $sql .= "(first, last, email, company, address, city, state, zip, > phone, fax, mobile, comments)"; > $sql .= "VALUES"; > $sql .= "('$first', '$last', '$email', > '$company', '$address', > '$city', '$state', '$zip', '$phone', '$fax', > '$mobile', '$comments')"; > also can you do this @ field level ? > > > Danny > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#102272) next »