Welcome. This is a place to get user-to-user support, learn more, and share ideas. If you can't find your answers here, feel free to ask by creating a new topic or visit the support ticket system at http://my.hostned.com Have fun here!
0 Members and 1 Guest are viewing this topic.
ucwords(PHP 3 >= 3.0.3, PHP 4, PHP 5)ucwords -- Uppercase the first character of each word in a string Descriptionstring ucwords ( string str )Returns a string with the first character of each word in str capitalized, if that character is alphabetic. The definition of a word is any string of characters that is immediately after a whitespace (These are: space, form-feed, newline, carriage return, horizontal tab, and vertical tab). Example 1. ucwords() exampleCode: [Select]<?php$foo = 'hello world!';$foo = ucwords($foo); // Hello World! $bar = 'HELLO WORLD!';$bar = ucwords($bar); // HELLO WORLD!$bar = ucwords(strtolower($bar)); // Hello World!?> Note: This function is binary-safe.
<?php$foo = 'hello world!';$foo = ucwords($foo); // Hello World! $bar = 'HELLO WORLD!';$bar = ucwords($bar); // HELLO WORLD!$bar = ucwords(strtolower($bar)); // Hello World!?>
That is great. I can't recall how many times I have needed this when scripting PHP code. Hey, does anyone know how to do this in CGI?
style="text-transform:capitalize;"