philip Wed Nov 21 13:39:06 2001 EDT
Modified files:
/phpdoc/en/functions strings.xml
Log:
Expanded examples for ucwords() and ucfirst() a bit.
Index: phpdoc/en/functions/strings.xml
diff -u phpdoc/en/functions/strings.xml:1.124 phpdoc/en/functions/strings.xml:1.125
--- phpdoc/en/functions/strings.xml:1.124 Mon Nov 19 08:46:48 2001
+++ phpdoc/en/functions/strings.xml Wed Nov 21 13:39:05 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.124 $ -->
+<!-- $Revision: 1.125 $ -->
<reference id="ref.strings">
<title>String functions</title>
<titleabbrev>Strings</titleabbrev>
@@ -3788,15 +3788,17 @@
<example>
<title><function>ucfirst</function> example</title>
<programlisting role="php">
-$text = 'mary had a little lamb and she loved it so.';
-$text = ucfirst($text); // $text is now Mary had a little lamb
- // and she loved it so.
+$foo = 'hello world!';
+$foo = ucfirst($text); // Hello world!
+
+$bar = 'HELLO WORLD!';
+$bar = ucfirst($bar); // HELLO WORLD!
+$bar = ucfirst(strtolower($bar)); // Hello world!
</programlisting>
</example>
</para>
<para>
- See also <function>strtolower</function> and
- <function>strtoupper</function>,
+ See also <function>strtolower</function>, <function>strtoupper</function>,
and <function>ucwords</function>.
</para>
</refsect1>
@@ -3824,9 +3826,12 @@
<example>
<title><function>ucwords</function> example</title>
<programlisting role="php">
-$text = "mary had a little lamb and she loved it so.";
-$text = ucwords($text); // $text is now: Mary Had A Little
- // Lamb And She Loved It So.
+$foo = 'hello world!';
+$foo = ucwords($foo); // Hello World!
+
+$bar = 'HELLO WORLD!';
+$bar = ucwords($bar); // HELLO WORLD!
+$bar = ucwords(strtolower($bar)); // Hello World!
</programlisting>
</example>
<note>