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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php