Small corrections

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@27867 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Stefan Livieratos 2000-07-08 13:50:19 +00:00
parent 6014731ea9
commit bdefbeb6bb
7 changed files with 33 additions and 33 deletions

View file

@ -20,7 +20,7 @@
<example>
<title>Examples of valid patterns</title>
<itemizedlist>
<listitem><simpara>/<\/\w+>/</simpara></listitem>
<listitem><simpara>/&lt;\/\w+>/</simpara></listitem>
<listitem><simpara>|(\d{3})-\d+|Sm</simpara></listitem>
<listitem><simpara>/^(?i)php[34]/</simpara></listitem>
</itemizedlist>
@ -156,7 +156,7 @@ print $out[1][0].", ".$out[1][1]."\n"
This example will produce:
<informalexample>
<programlisting>
&lt;b>example: &lt/b>, &lt;div align=left>this is a test&lt;/div>
&lt;b>example: &lt;/b>, &lt;div align=left>this is a test&lt;/div>
example: , this is a test
</programlisting>
</informalexample>
@ -308,7 +308,7 @@ $startDate = 5/27/1999
<example>
<title>Using /e modifier</title>
<programlisting role="php">
preg_replace ("/(<\/?)(\w+)([^>]*>)/e",
preg_replace ("/(&lt;\/?)(\w+)([^>]*>)/e",
"'\\1'.strtoupper('\\2').'\\3'",
$html_body);
</programlisting>
@ -399,7 +399,7 @@ $keywords = preg_split ("/[\s,]+/", "hypertext language, programming");
</para>
<para>
The special regular expression characters are:
<screen>. \\ + * ? [ ^ ] $ ( ) { } = ! < > | :</screen>
<screen>. \\ + * ? [ ^ ] $ ( ) { } = ! &lt; > | :</screen>
</para>
</refsect1>
</refentry>

View file

@ -8,7 +8,7 @@
You can use the PDF functions in PHP to create PDF files if you
have the PDF library by Thomas Merz (available at
<ulink url="&url.pdf;">&url.pdf;</ulink>;
you will also need <ulink url="&url.jpeg">the JPEG library</ulink>
you will also need <ulink url="&url.jpeg;">the JPEG library</ulink>
and <ulink url="&url.tiff;">the TIFF library</ulink> to
compile this. These two libs also quite often make problems when
configuring php. Follow the messages of configure to fix possible
@ -232,7 +232,7 @@ while($pagecount-- > 0) {
/* minute strokes */
pdf_setlinewidth($pdf, 2.0);
for ($alpha = 0; $alpha < 360; $alpha += 6) {
for ($alpha = 0; $alpha &lt; 360; $alpha += 6) {
pdf_rotate($pdf, 6.0);
pdf_moveto($pdf, $radius, 0.0);
pdf_lineto($pdf, $radius-$margin/3, 0.0);
@ -244,7 +244,7 @@ while($pagecount-- > 0) {
/* 5 minute strokes */
pdf_setlinewidth($pdf, 3.0);
for ($alpha = 0; $alpha < 360; $alpha += 30) {
for ($alpha = 0; $alpha &lt; 360; $alpha += 30) {
pdf_rotate($pdf, 30.0);
pdf_moveto($pdf, $radius, 0.0);
pdf_lineto($pdf, $radius-$margin, 0.0);

View file

@ -34,17 +34,17 @@
</thead>
<tbody>
<row>
<entry>postmaster &</entry>
<entry>postmaster &amp;</entry>
<entry>pg_connect("", "", "", "", "dbname");</entry>
<entry>OK</entry>
</row>
<row>
<entry>postmaster -i &</entry>
<entry>postmaster -i &amp;</entry>
<entry>pg_connect("", "", "", "", "dbname");</entry>
<entry>OK</entry>
</row>
<row>
<entry>postmaster &</entry>
<entry>postmaster &amp;</entry>
<entry>pg_connect("localhost", "", "", "", "dbname");</entry>
<entry>
Unable to connect to PostgreSQL server: connectDB() failed:
@ -54,7 +54,7 @@
</entry>
</row>
<row>
<entry>postmaster -i &</entry>
<entry>postmaster -i &amp;</entry>
<entry>pg_connect("localhost", "", "", "", "dbname");</entry>
<entry>OK</entry>
</row>
@ -138,7 +138,7 @@
&lt;?php
$result = pg_exec($conn, "INSERT INTO verlag VALUES ('Autor')");
$cmdtuples = pg_cmdtuples($result);
echo $cmdtuples . " <- cmdtuples affected.";
echo $cmdtuples . " &lt;- cmdtuples affected.";
?>
</programlisting>
</example>
@ -330,10 +330,10 @@ if (!$result) {
}
$arr = pg_fetch_array ($result, 0);
echo $arr[0] . " <- array\n";
echo $arr[0] . " &lt;- array\n";
$arr = pg_fetch_array ($result, 1);
echo $arr["author"] . " <- array\n";
echo $arr["author"] . " &lt;- array\n";
?>
</programlisting>
</example>
@ -483,13 +483,13 @@ if (!$result) {
}
$row = pg_fetch_row ($result, 0);
echo $row[0] . " <- row\n";
echo $row[0] . " &lt;- row\n";
$row = pg_fetch_row ($result, 1);
echo $row[0] . " <- row\n";
echo $row[0] . " &lt;- row\n";
$row = pg_fetch_row ($result, 2);
echo $row[1] . " <- row\n";
echo $row[1] . " &lt;- row\n";
?>
</programlisting>
</example>

View file

@ -562,14 +562,14 @@ $pieces = explode (" ", $pizza);
<title>Translation Table Example</title>
<programlisting role="php">
$trans = get_html_translation_table (HTML_ENTITIES);
$str = "Hallo & &lt;Frau> & Krämer";
$str = "Hallo &amp; &lt;Frau> &amp; Kr&auml;mer";
$encoded = strtr ($str, $trans);
</programlisting>
</example>
The <literal>$encoded</literal> variable will now contain: "Hallo
&<sgmltag>amp</sgmltag>;
&<sgmltag>lt</sgmltag>;Frau&<sgmltag>gt</sgmltag>;
&<sgmltag>amp</sgmltag>; Kr&<sgmltag>auml</sgmltag>;mer".
&amp;<sgmltag>amp</sgmltag>;
&amp;<sgmltag>lt</sgmltag>;Frau&amp;<sgmltag>gt</sgmltag>;
&amp;<sgmltag>amp</sgmltag>; Kr&amp;<sgmltag>auml</sgmltag>;mer".
</para>
<para>
The cool thing is using <function>array_flip</function> to change
@ -580,8 +580,8 @@ $trans = array_flip ($trans);
$original = strtr ($str, $trans);
</programlisting>
</informalexample>
The content of <literal>$original</literal> would be: "Hallo &
&lt;Frau> & Krämer".
The content of <literal>$original</literal> would be: "Hallo &amp;
&lt;Frau> &amp; Kr&auml;mer".
<note>
<para>
This function was added in PHP 4.0.
@ -909,7 +909,7 @@ $colon_separated = implode (":", $array);
<para>
Metaphone was developed by Lawrence Philips
&lt;lphilips@verity.com>. It is described in ["Practical
Algorithms for Programmers", Binstock & Rex, Addison Wesley,
Algorithms for Programmers", Binstock &amp; Rex, Addison Wesley,
1995].
<note>
<para>
@ -1650,7 +1650,7 @@ $formatted = sprintf ("%01.2f", $money);
</funcprototype>
</funcsynopsis>
<para>
Returns < 0 if <parameter>str1</parameter> is less than
Returns &lt; 0 if <parameter>str1</parameter> is less than
<parameter>str2</parameter>; > 0 if <parameter>str1</parameter>
is greater than <parameter>str2</parameter>, and 0 if they are
equal.
@ -1711,7 +1711,7 @@ if (!strcasecmp ($var1, $var2)) {
</funcprototype>
</funcsynopsis>
<simpara>
Returns < 0 if <parameter>str1</parameter> is less than
Returns &lt; 0 if <parameter>str1</parameter> is less than
<parameter>str2</parameter>; > 0 if <parameter>str1</parameter>
is greater than <parameter>str2</parameter>, and 0 if they are
equal.
@ -1946,7 +1946,7 @@ if ($pos === false) { // note: three equal signs
// in versions older than 4.0b3:
$pos = strpos ($mystring, "b");
if (is_string ($pos) && !$pos) {
if (is_string ($pos) &amp;&amp; !$pos) {
// not found...
}
</programlisting>

View file

@ -41,7 +41,7 @@ swf_translate (-50, 80, 0);
swf_placeobject (11, 60);
swf_popmatrix ();
for ($i = 0; $i < 30; $i++) {
for ($i = 0; $i &lt; 30; $i++) {
$p = $i/(30-1);
swf_pushmatrix ();
swf_scale (1-($p*.9), 1, 1);
@ -56,7 +56,7 @@ for ($i = 0; $i < 30; $i++) {
swf_showframe ();
}
for ($i = 0; $i < 30; $i++) {
for ($i = 0; $i &lt; 30; $i++) {
swf_removeobject (50);
if (($i%4) == 0) {
swf_showframe ();
@ -72,7 +72,7 @@ swf_closefile ();
</programlisting>
</example>
It will produce the animation found at the following <ulink
url="&url.swf.test">url</ulink>.
url="&url.swf.test;">url</ulink>.
</para>
<note>
<para>
@ -1115,7 +1115,7 @@ swf_closefile ();
</funcsynopsis>
<para>
The <function>swf_shapeLineTo</function> draws a line to the x,y
coordinates given by the <parameter>x</parameter> parameter & the
coordinates given by the <parameter>x</parameter> parameter &amp; the
<parameter>y</parameter> parameter. The current position is then
set to the x,y parameters.
</para>

View file

@ -99,7 +99,7 @@
<example>
<title><function>Urldecode</function> example</title>
<programlisting role="php">
$a = split ('&', $querystring);
$a = split ('&amp;', $querystring);
$i = 0;
while ($i &lt; count ($a)) {
$b = split ('=', $a [$i]);

View file

@ -626,7 +626,7 @@ var $parser;
function xml() {
$this->parser = xml_parser_create();
xml_set_object($this->parser,&$this);
xml_set_object($this->parser,&amp;$this);
xml_set_element_handler($this->parser,"tag_open","tag_close");
xml_set_character_data_handler($this->parser,"cdata");
}