philip Fri May 30 12:47:59 2003 EDT
Modified files:
/phpdoc/en/reference/strings/functions addcslashes.xml chr.xml
chunk-split.xml fprintf.xml
get-html-translation-table.xml
localeconv.xml ord.xml
soundex.xml sprintf.xml
sscanf.xml strcasecmp.xml
strip-tags.xml
str-ireplace.xml
strnatcmp.xml str-pad.xml
strrchr.xml str-repeat.xml
str-replace.xml strrev.xml
strspn.xml strstr.xml
strtolower.xml
strtoupper.xml ucfirst.xml
ucwords.xml wordwrap.xml
Log:
Added php tags (<?php ?>) to examples.
Index: phpdoc/en/reference/strings/functions/addcslashes.xml
diff -u phpdoc/en/reference/strings/functions/addcslashes.xml:1.2
phpdoc/en/reference/strings/functions/addcslashes.xml:1.3
--- phpdoc/en/reference/strings/functions/addcslashes.xml:1.2 Wed Apr 17 02:44:12
2002
+++ phpdoc/en/reference/strings/functions/addcslashes.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.addcslashes">
<refnamediv>
@@ -35,7 +35,9 @@
<title><function>addcslashes</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$escaped = addcslashes($not_escaped, "[EMAIL PROTECTED]");
+?>
]]>
</programlisting>
</example>
@@ -47,11 +49,13 @@
<informalexample>
<programlisting role="php">
<![CDATA[
+<?php
echo addcslashes('foo[ ]', 'A..z');
// output: \f\o\o\[ \]
// All upper and lower-case letters will be escaped
// ... but so will the [\]^_` and any tabs, line
// feeds, carriage returns, etc.
+?>
]]>
</programlisting>
</informalexample>
@@ -63,8 +67,10 @@
<informalexample>
<programlisting role="php">
<![CDATA[
+<?php
echo addcslashes("zoo['.']", 'z..A');
// output: \zoo['\.']
+?>
]]>
</programlisting>
</informalexample>
Index: phpdoc/en/reference/strings/functions/chr.xml
diff -u phpdoc/en/reference/strings/functions/chr.xml:1.2
phpdoc/en/reference/strings/functions/chr.xml:1.3
--- phpdoc/en/reference/strings/functions/chr.xml:1.2 Wed Apr 17 02:44:13 2002
+++ phpdoc/en/reference/strings/functions/chr.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.chr">
<refnamediv>
@@ -19,11 +19,13 @@
<title><function>chr</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$str .= chr(27); /* add an escape character at the end of $str */
/* Often this is more useful */
$str = sprintf("The string ends in escape: %c", 27);
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/chunk-split.xml
diff -u phpdoc/en/reference/strings/functions/chunk-split.xml:1.5
phpdoc/en/reference/strings/functions/chunk-split.xml:1.6
--- phpdoc/en/reference/strings/functions/chunk-split.xml:1.5 Sat May 17 21:25:57
2003
+++ phpdoc/en/reference/strings/functions/chunk-split.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.chunk-split">
<refnamediv>
@@ -25,9 +25,10 @@
<title><function>chunk_split</function> example</title>
<programlisting role="php">
<![CDATA[
-# format $data using RFC 2045 semantics
-
+<?php
+// format $data using RFC 2045 semantics
$new_string = chunk_split(base64_encode($data));
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/fprintf.xml
diff -u phpdoc/en/reference/strings/functions/fprintf.xml:1.1
phpdoc/en/reference/strings/functions/fprintf.xml:1.2
--- phpdoc/en/reference/strings/functions/fprintf.xml:1.1 Sun Jan 19 23:08:28
2003
+++ phpdoc/en/reference/strings/functions/fprintf.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="function.fprintf">
<refnamediv>
<refname>fprintf</refname>
@@ -134,7 +134,9 @@
<title><function>sprintf</function>: zero-padded integers</title>
<programlisting role="php">
<![CDATA[
+<?php
$isodate = sprintf("%04d-%02d-%02d", $year, $month, $day);
+?>
]]>
</programlisting>
</example>
@@ -142,12 +144,14 @@
<title><function>sprintf</function>: formatting currency</title>
<programlisting role="php">
<![CDATA[
+<?php
$money1 = 68.75;
$money2 = 54.35;
$money = $money1 + $money2;
// echo $money will output "123.1";
$formatted = sprintf("%01.2f", $money);
// echo $formatted will output "123.10"
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/get-html-translation-table.xml
diff -u phpdoc/en/reference/strings/functions/get-html-translation-table.xml:1.4
phpdoc/en/reference/strings/functions/get-html-translation-table.xml:1.5
--- phpdoc/en/reference/strings/functions/get-html-translation-table.xml:1.4 Sat
Mar 1 04:19:59 2003
+++ phpdoc/en/reference/strings/functions/get-html-translation-table.xml Fri
May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.get-html-translation-table">
<refnamediv>
@@ -39,9 +39,11 @@
<title>Translation Table Example</title>
<programlisting role="php">
<![CDATA[
+<?php
$trans = get_html_translation_table(HTML_ENTITIES);
$str = "Hallo & <Frau> & Kr�mer";
$encoded = strtr($str, $trans);
+?>
]]>
</programlisting>
</example>
@@ -55,8 +57,10 @@
<informalexample>
<programlisting role="php">
<![CDATA[
+<?php
$trans = array_flip($trans);
$original = strtr($encoded, $trans);
+?>
]]>
</programlisting>
</informalexample>
Index: phpdoc/en/reference/strings/functions/localeconv.xml
diff -u phpdoc/en/reference/strings/functions/localeconv.xml:1.3
phpdoc/en/reference/strings/functions/localeconv.xml:1.4
--- phpdoc/en/reference/strings/functions/localeconv.xml:1.3 Sat Jul 27 00:07:06
2002
+++ phpdoc/en/reference/strings/functions/localeconv.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.68 -->
<refentry id="function.localeconv">
<refnamediv>
@@ -174,6 +174,7 @@
<title><function>localeconv</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
setlocale(LC_ALL, "en_US");
$locale_info = localeconv();
@@ -198,6 +199,7 @@
echo "p_sign_posn: {$locale_info["p_sign_posn"]}\n";
echo "n_sign_posn: {$locale_info["n_sign_posn"]}\n";
echo "</PRE>\n";
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/ord.xml
diff -u phpdoc/en/reference/strings/functions/ord.xml:1.2
phpdoc/en/reference/strings/functions/ord.xml:1.3
--- phpdoc/en/reference/strings/functions/ord.xml:1.2 Wed Apr 17 02:44:21 2002
+++ phpdoc/en/reference/strings/functions/ord.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.ord">
<refnamediv>
@@ -20,9 +20,11 @@
<title><function>ord</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
if (ord($str) == 10) {
echo "The first character of \$str is a line feed.\n";
}
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/soundex.xml
diff -u phpdoc/en/reference/strings/functions/soundex.xml:1.2
phpdoc/en/reference/strings/functions/soundex.xml:1.3
--- phpdoc/en/reference/strings/functions/soundex.xml:1.2 Wed Apr 17 02:44:21
2002
+++ phpdoc/en/reference/strings/functions/soundex.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.soundex">
<refnamediv>
@@ -32,12 +32,14 @@
<title>Soundex Examples</title>
<programlisting role="php">
<![CDATA[
+<?php
soundex("Euler") == soundex("Ellery") == 'E460';
soundex("Gauss") == soundex("Ghosh") == 'G200';
soundex("Hilbert") == soundex("Heilbronn") == 'H416';
soundex("Knuth") == soundex("Kant") == 'K530';
soundex("Lloyd") == soundex("Ladd") == 'L300';
soundex("Lukasiewicz") == soundex("Lissajous") == 'L222';
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/sprintf.xml
diff -u phpdoc/en/reference/strings/functions/sprintf.xml:1.5
phpdoc/en/reference/strings/functions/sprintf.xml:1.6
--- phpdoc/en/reference/strings/functions/sprintf.xml:1.5 Tue Jan 7 16:05:16
2003
+++ phpdoc/en/reference/strings/functions/sprintf.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.sprintf">
<refnamediv>
@@ -125,8 +125,10 @@
<title>Argument swapping</title>
<programlisting role="php">
<![CDATA[
+<?php
$format = "There are %d monkeys in the %s";
printf($format,$num,$location);
+?>
]]>
</programlisting>
</example>
@@ -138,8 +140,10 @@
<title>Argument swapping</title>
<programlisting role="php">
<![CDATA[
+<?php
$format = "The %s contains %d monkeys";
printf($format,$num,$location);
+?>
]]>
</programlisting>
</example>
@@ -152,8 +156,10 @@
<title>Argument swapping</title>
<programlisting role="php">
<![CDATA[
+<?php
$format = "The %2\$s contains %1\$d monkeys";
printf($format,$num,$location);
+?>
]]>
</programlisting>
</example>
@@ -163,9 +169,11 @@
<title>Argument swapping</title>
<programlisting role="php">
<![CDATA[
+<?php
$format = "The %2\$s contains %1\$d monkeys.
That's a nice %2\$s full of %1\$d monkeys.";
printf($format, $num, $location);
+?>
]]>
</programlisting>
</example>
@@ -184,7 +192,9 @@
<title><function>sprintf</function>: zero-padded integers</title>
<programlisting role="php">
<![CDATA[
+<?php
$isodate = sprintf("%04d-%02d-%02d", $year, $month, $day);
+?>
]]>
</programlisting>
</example>
@@ -192,12 +202,14 @@
<title><function>sprintf</function>: formatting currency</title>
<programlisting role="php">
<![CDATA[
+<?php
$money1 = 68.75;
$money2 = 54.35;
$money = $money1 + $money2;
// echo $money will output "123.1";
$formatted = sprintf("%01.2f", $money);
// echo $formatted will output "123.10"
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/sscanf.xml
diff -u phpdoc/en/reference/strings/functions/sscanf.xml:1.5
phpdoc/en/reference/strings/functions/sscanf.xml:1.6
--- phpdoc/en/reference/strings/functions/sscanf.xml:1.5 Wed Jan 22 16:37:33
2003
+++ phpdoc/en/reference/strings/functions/sscanf.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.33 -->
<refentry id="function.sscanf">
<refnamediv>
@@ -34,12 +34,14 @@
<title><function>sscanf</function> Example</title>
<programlisting role="php">
<![CDATA[
+<?php
// getting the serial number
$serial = sscanf("SN/2350001","SN/%d");
// and the date of manufacturing
$mandate = "January 01 2000";
list($month, $day, $year) = sscanf($mandate,"%s %d %d");
echo "Item $serial was manufactured on: $year-".substr($month,0,3)."-$day\n";
+?>
]]>
</programlisting>
</example>
@@ -50,6 +52,7 @@
<title><function>sscanf</function> - using optional parameters</title>
<programlisting role="php">
<![CDATA[
+<?php
// get author info and generate DocBook entry
$auth = "24\tLewis Carroll";
$n = sscanf($auth,"%d\t%s %s", &$id, &$first, &$last);
@@ -57,6 +60,7 @@
<firstname>$first</firstname>
<surname>$last</surname>
</author>\n";
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/strcasecmp.xml
diff -u phpdoc/en/reference/strings/functions/strcasecmp.xml:1.3
phpdoc/en/reference/strings/functions/strcasecmp.xml:1.4
--- phpdoc/en/reference/strings/functions/strcasecmp.xml:1.3 Fri May 9 05:22:55
2003
+++ phpdoc/en/reference/strings/functions/strcasecmp.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strcasecmp">
<refnamediv>
@@ -24,11 +24,13 @@
<title><function>strcasecmp</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$var1 = "Hello";
$var2 = "hello";
if (strcasecmp($var1, $var2) == 0) {
echo '$var1 is equal to $var2 in a case-insensitive string comparison';
}
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/strip-tags.xml
diff -u phpdoc/en/reference/strings/functions/strip-tags.xml:1.2
phpdoc/en/reference/strings/functions/strip-tags.xml:1.3
--- phpdoc/en/reference/strings/functions/strip-tags.xml:1.2 Wed Apr 17 02:44:22
2002
+++ phpdoc/en/reference/strings/functions/strip-tags.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strip-tags">
<refnamediv>
@@ -35,7 +35,9 @@
<title><function>strip_tags</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$string = strip_tags($string, '<a><b><i><u>');
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/str-ireplace.xml
diff -u phpdoc/en/reference/strings/functions/str-ireplace.xml:1.2
phpdoc/en/reference/strings/functions/str-ireplace.xml:1.3
--- phpdoc/en/reference/strings/functions/str-ireplace.xml:1.2 Mon Apr 14 23:20:22
2003
+++ phpdoc/en/reference/strings/functions/str-ireplace.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.str-ireplace">
<refnamediv>
@@ -49,7 +49,9 @@
<title><function>str_ireplace</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$bodytag = str_replace("%body%", "black", "<body text=%BODY%>");
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/strnatcmp.xml
diff -u phpdoc/en/reference/strings/functions/strnatcmp.xml:1.3
phpdoc/en/reference/strings/functions/strnatcmp.xml:1.4
--- phpdoc/en/reference/strings/functions/strnatcmp.xml:1.3 Sun May 26 12:48:34
2002
+++ phpdoc/en/reference/strings/functions/strnatcmp.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.38 -->
<refentry id="function.strnatcmp">
<refnamediv>
@@ -25,6 +25,7 @@
<informalexample>
<programlisting role="php">
<![CDATA[
+<?php
$arr1 = $arr2 = array("img12.png","img10.png","img2.png","img1.png");
echo "Standard string comparison\n";
usort($arr1,"strcmp");
@@ -32,6 +33,7 @@
echo "\nNatural order string comparison\n";
usort($arr2,"strnatcmp");
print_r($arr2);
+?>
]]>
</programlisting>
</informalexample>
Index: phpdoc/en/reference/strings/functions/str-pad.xml
diff -u phpdoc/en/reference/strings/functions/str-pad.xml:1.2
phpdoc/en/reference/strings/functions/str-pad.xml:1.3
--- phpdoc/en/reference/strings/functions/str-pad.xml:1.2 Wed Apr 17 02:44:22
2002
+++ phpdoc/en/reference/strings/functions/str-pad.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.26 -->
<refentry id="function.str-pad">
<refnamediv>
@@ -41,10 +41,12 @@
<title><function>str_pad</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$input = "Alien";
print str_pad($input, 10); // produces "Alien "
print str_pad($input, 10, "-=", STR_PAD_LEFT); // produces "-=-=-Alien"
print str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___"
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/strrchr.xml
diff -u phpdoc/en/reference/strings/functions/strrchr.xml:1.2
phpdoc/en/reference/strings/functions/strrchr.xml:1.3
--- phpdoc/en/reference/strings/functions/strrchr.xml:1.2 Wed Apr 17 02:44:23
2002
+++ phpdoc/en/reference/strings/functions/strrchr.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strrchr">
<refnamediv>
@@ -35,12 +35,14 @@
<title><function>strrchr</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
// get last directory in $PATH
$dir = substr(strrchr($PATH, ":"), 1);
// get everything after last newline
$text = "Line 1\nLine 2\nLine 3";
$last = substr(strrchr($text, 10), 1 );
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/str-repeat.xml
diff -u phpdoc/en/reference/strings/functions/str-repeat.xml:1.5
phpdoc/en/reference/strings/functions/str-repeat.xml:1.6
--- phpdoc/en/reference/strings/functions/str-repeat.xml:1.5 Sat Jul 27 00:07:06
2002
+++ phpdoc/en/reference/strings/functions/str-repeat.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.str-repeat">
<refnamediv>
@@ -24,7 +24,9 @@
<title><function>str_repeat</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
echo str_repeat("-=", 10);
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/str-replace.xml
diff -u phpdoc/en/reference/strings/functions/str-replace.xml:1.5
phpdoc/en/reference/strings/functions/str-replace.xml:1.6
--- phpdoc/en/reference/strings/functions/str-replace.xml:1.5 Mon Apr 14 23:20:22
2003
+++ phpdoc/en/reference/strings/functions/str-replace.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.str-replace">
<refnamediv>
@@ -53,7 +53,9 @@
<title><function>str_replace</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$bodytag = str_replace("%body%", "black", "<body text=%body%>");
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/strrev.xml
diff -u phpdoc/en/reference/strings/functions/strrev.xml:1.2
phpdoc/en/reference/strings/functions/strrev.xml:1.3
--- phpdoc/en/reference/strings/functions/strrev.xml:1.2 Wed Apr 17 02:44:23
2002
+++ phpdoc/en/reference/strings/functions/strrev.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strrev">
<refnamediv>
@@ -18,7 +18,7 @@
<title>Reversing a string with <function>strrev</function></title>
<programlisting role="php">
<![CDATA[
-<php
+<?php
echo strrev("Hello world!"); // outputs "!dlrow olleH"
?>
]]>
Index: phpdoc/en/reference/strings/functions/strspn.xml
diff -u phpdoc/en/reference/strings/functions/strspn.xml:1.2
phpdoc/en/reference/strings/functions/strspn.xml:1.3
--- phpdoc/en/reference/strings/functions/strspn.xml:1.2 Wed Apr 17 02:44:23
2002
+++ phpdoc/en/reference/strings/functions/strspn.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strspn">
<refnamediv>
@@ -25,7 +25,9 @@
<informalexample>
<programlisting role="php">
<![CDATA[
+<?php
$var = strspn("42 is the answer, what is the question ...", "1234567890");
+?>
]]>
</programlisting>
</informalexample>
Index: phpdoc/en/reference/strings/functions/strstr.xml
diff -u phpdoc/en/reference/strings/functions/strstr.xml:1.4
phpdoc/en/reference/strings/functions/strstr.xml:1.5
--- phpdoc/en/reference/strings/functions/strstr.xml:1.4 Tue Jan 21 23:15:21
2003
+++ phpdoc/en/reference/strings/functions/strstr.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strstr">
<refnamediv>
@@ -36,9 +36,11 @@
<title><function>strstr</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$email = '[EMAIL PROTECTED]';
$domain = strstr($email, '@');
print $domain; // prints @example.com
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/strtolower.xml
diff -u phpdoc/en/reference/strings/functions/strtolower.xml:1.2
phpdoc/en/reference/strings/functions/strtolower.xml:1.3
--- phpdoc/en/reference/strings/functions/strtolower.xml:1.2 Wed Apr 17 02:44:24
2002
+++ phpdoc/en/reference/strings/functions/strtolower.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strtolower">
<refnamediv>
@@ -25,9 +25,11 @@
<title><function>strtolower</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtolower($str);
print $str; # Prints mary had a little lamb and she loved it so
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/strtoupper.xml
diff -u phpdoc/en/reference/strings/functions/strtoupper.xml:1.2
phpdoc/en/reference/strings/functions/strtoupper.xml:1.3
--- phpdoc/en/reference/strings/functions/strtoupper.xml:1.2 Wed Apr 17 02:44:24
2002
+++ phpdoc/en/reference/strings/functions/strtoupper.xml Fri May 30 12:47:59
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strtoupper">
<refnamediv>
@@ -25,9 +25,11 @@
<title><function>strtoupper</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtoupper($str);
print $str; # Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/ucfirst.xml
diff -u phpdoc/en/reference/strings/functions/ucfirst.xml:1.2
phpdoc/en/reference/strings/functions/ucfirst.xml:1.3
--- phpdoc/en/reference/strings/functions/ucfirst.xml:1.2 Wed Apr 17 02:44:24
2002
+++ phpdoc/en/reference/strings/functions/ucfirst.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.ucfirst">
<refnamediv>
@@ -25,12 +25,14 @@
<title><function>ucfirst</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$foo = 'hello world!';
$foo = ucfirst($foo); // Hello world!
$bar = 'HELLO WORLD!';
$bar = ucfirst($bar); // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/ucwords.xml
diff -u phpdoc/en/reference/strings/functions/ucwords.xml:1.2
phpdoc/en/reference/strings/functions/ucwords.xml:1.3
--- phpdoc/en/reference/strings/functions/ucwords.xml:1.2 Wed Apr 17 02:44:24
2002
+++ phpdoc/en/reference/strings/functions/ucwords.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.ucwords">
<refnamediv>
@@ -22,12 +22,14 @@
<title><function>ucwords</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$foo = 'hello world!';
$foo = ucwords($foo); // Hello World!
$bar = 'HELLO WORLD!';
$bar = ucwords($bar); // HELLO WORLD!
$bar = ucwords(strtolower($bar)); // Hello World!
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/strings/functions/wordwrap.xml
diff -u phpdoc/en/reference/strings/functions/wordwrap.xml:1.6
phpdoc/en/reference/strings/functions/wordwrap.xml:1.7
--- phpdoc/en/reference/strings/functions/wordwrap.xml:1.6 Thu May 22 21:08:44
2003
+++ phpdoc/en/reference/strings/functions/wordwrap.xml Fri May 30 12:47:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.142 -->
<refentry id="function.wordwrap">
<refnamediv>
@@ -46,10 +46,12 @@
<title><function>wordwrap</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20 );
echo "$newtext\n";
+?>
]]>
</programlisting>
<para>
@@ -69,10 +71,12 @@
<title><function>wordwrap</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$text = "A very long woooooooooooord.";
$newtext = wordwrap( $text, 8, "\n", 1);
echo "$newtext\n";
+?>
]]>
</programlisting>
<para>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php