Fixed typos + cosmetic changes

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@27864 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Stefan Livieratos 2000-07-08 10:52:08 +00:00
parent 14d2ce1f6e
commit 305206c5a1
11 changed files with 35 additions and 28 deletions

View file

@ -766,7 +766,7 @@ array_values($array); // returns array("XL", "gold")
<programlisting role="php">
$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
function test_alter (&$item1, $key, $prefix) {
function test_alter (&amp;$item1, $key, $prefix) {
$item1 = "$prefix: $item1";
}

View file

@ -104,7 +104,7 @@ while($pagecount-- > 0) {
/* minute strokes */
cpdf_setlinewidth($pdf, 2.0);
for ($alpha = 0; $alpha < 360; $alpha += 6)
for ($alpha = 0; $alpha &lt; 360; $alpha += 6)
{
cpdf_rotate($pdf, 6.0);
cpdf_moveto($pdf, $radius, 0.0);
@ -117,7 +117,7 @@ while($pagecount-- > 0) {
/* 5 minute strokes */
cpdf_setlinewidth($pdf, 3.0);
for ($alpha = 0; $alpha < 360; $alpha += 30)
for ($alpha = 0; $alpha &lt; 360; $alpha += 30)
{
cpdf_rotate($pdf, 30.0);
cpdf_moveto($pdf, $radius, 0.0);

View file

@ -146,7 +146,7 @@ closedir($handle);
&lt;?php
$handle=opendir('.');
while ($file = readdir($handle)) {
if ($file != "." && $file != "..") {
if ($file != "." &amp;&amp; $file != "..") {
echo "$file\n";
}
}

View file

@ -7,7 +7,7 @@
<simpara>
Forms Data Format (FDF) is a format for handling
forms within PDF documents. You should read the documentation at
<ulink url="&spec.pdf.fdf">&spec.pdf.fdf</ulink>
<ulink url="&spec.pdf.fdf;">&spec.pdf.fdf;</ulink>
for more information on what FDF is and how it is used in general.
</simpara>

View file

@ -465,10 +465,10 @@ $row = 1;
$fp = fopen ("test.csv","r");
while ($data = fgetcsv ($fp, 1000, ",")) {
$num = count ($data);
print "&lt;p> $num fields in line $row: &lt;br>";
print "&lt;p&gt; $num fields in line $row: &lt;br&gt;";
$row++;
for ($c=0; $c<$num; $c++) {
print $data[$c] . "&lt;br>";
for ($c=0; $c&lt;$num; $c++) {
print $data[$c] . "&lt;br&gt;";
}
}
fclose ($fp);
@ -2158,7 +2158,7 @@ if ( touch($FileName) ) {
</funcprototype>
</funcsynopsis>
<para>
<function>Umask</function> sets PHP's umask to mask & 0777 and
<function>Umask</function> sets PHP's umask to mask &amp; 0777 and
returns the old umask. When PHP is being used as a server module,
the umask is restored when each request is finished.
</para>

View file

@ -545,7 +545,7 @@ ifx_free_result($res_id);
</funcprototype>
</funcsynopsis>
<para>
The Informix error codes (SQLSTATE & SQLCODE) formatted as
The Informix error codes (SQLSTATE &amp; SQLCODE) formatted as
follows :
</para>
<para>
@ -888,7 +888,7 @@ $types = ifx_fieldtypes ($resultid);
if (! isset ($types)) {
... error ...
}
for ($i = 0; $i < count($types); $i++) {
for ($i = 0; $i &lt; count($types); $i++) {
$fname = key($types);
printf("%s :\t type = %s\n", $fname, $types[$fname]);
next($types);
@ -929,7 +929,7 @@ $properties = ifx_fieldtypes ($resultid);
if (! isset($properties)) {
... error ...
}
for ($i = 0; $i < count($properties); $i++) {
for ($i = 0; $i &lt; count($properties); $i++) {
$fname = key ($properties);
printf ("%s:\t type = %s\n", $fname, $properties[$fname]);
next ($properties);

View file

@ -67,12 +67,12 @@
<title>GetImageSize returning IPTC</title>
<programlisting>
&lt;?php
$size = GetImageSize ("testimg.jpg",&$info);
$size = GetImageSize ("testimg.jpg",&amp;$info);
if (isset ($info["APP13"])) {
$iptc = iptcparse ($info["APP13"]);
var_dump ($iptc);
}
?>
?&gt;
</programlisting>
</example>
<note>

View file

@ -348,7 +348,7 @@ $mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
|| die("can't connect: ".imap_last_error());
$name1 = "phpnewbox";
$name2 = imap_utf7_encode("phpnewböx");
$name2 = imap_utf7_encode("phpnewb&ouml;x");
$newname = $name1;
@ -2575,9 +2575,14 @@ imap_close($mbox);
</funcprototype>
</funcsynopsis>
<para>
<function>imap_mime_header_decode</function> function decodes MIME message header extensions that are non ASCII text (see <ulink url="&url.rfc;rfc2047.html">RFC2047</ulink>)
The decoded elements are returned in an array of objects, where each object has two properties, "charset" & "text".
If the element hasn't been encoded, and in other words is in plain US-ASCII,the "charset" property of that element is set to "default".
<function>imap_mime_header_decode</function> function decodes
MIME message header extensions that are non ASCII text
(see <ulink url="&url.rfc;rfc2047.html">RFC2047</ulink>)
The decoded elements are returned in an array of objects,
where each object has two properties, "charset" &amp; "text".
If the element hasn't been encoded, and in other words is in
plain US-ASCII,the "charset" property of that element is set to
"default".
</para>
<para>
<example>
@ -2595,11 +2600,13 @@ for($i=0;$i&lt;count($elements);$i++) {
</example>
</para>
<para>
In the above example we would have two elements, whereas the first element had previously been encoded with ISO-8859-1, and the second element would be plain US-ASCII.
In the above example we would have two elements, whereas the first
element had previously been encoded with ISO-8859-1, and the second
element would be plain US-ASCII.
</para>
</refsect1>
</refentry>
<refentry id="function.imap-mail-compose">
<refnamediv>
<refname>imap_mail_compose</refname>

View file

@ -1,5 +1,5 @@
<reference id="ref.info">
<title>PHP options & information</title>
<title>PHP options &amp; information</title>
<titleabbrev>PHP options/info</titleabbrev>
<refentry id="function.error-log">

View file

@ -92,7 +92,7 @@ if ($ds) {
$info = ldap_get_entries($ds, $sr);
echo "Data for ".$info["count"]." items returned:&lt;p>";
for ($i=0; $i<$info["count"]; $i++) {
for ($i=0; $i&lt;$info["count"]; $i++) {
echo "dn is: ". $info[$i]["dn"] ."&lt;br>";
echo "first cn entry is: ". $info[$i]["cn"][0] ."&lt;br>";
echo "first email entry is: ". $info[$i]["mail"][0] ."&lt;p>";
@ -668,7 +668,7 @@ $attrs = ldap_get_attributes($ds, $entry);
echo $attrs["count"]." attributes held for this entry:&lt;p>";
for ($i=0; $i<$attrs["count"]; $i++)
for ($i=0; $i&lt;$attrs["count"]; $i++)
echo $attrs[$i]."&lt;br>";
</programlisting>
</example></para>
@ -913,7 +913,7 @@ $sr=ldap_list($ds, $basedn, "ou=*", $justthese);
$info = ldap_get_entries($ds, $sr);
for ($i=0; $i<$info["count"]; $i++)
for ($i=0; $i&lt;$info["count"]; $i++)
echo $info[$i]["ou"][0] ;
</programlisting>
</example></para>
@ -1178,7 +1178,7 @@ print $info["count"]." entries returned&lt;p>";
<title>Enumerating all LDAP error messages</title>
<programlisting role="php">
&lt;?php
for($i=0; $i<100; $i++) {
for($i=0; $i&lt;100; $i++) {
printf("Error $i: %s&lt;br>\n", ldap_str2err($i));
}
?>

View file

@ -898,10 +898,10 @@ $conn = odbc_connect ("webdb", "php", "chicken");
$stmt = odbc_prepare ($conn,
"UPDATE sessions SET data = ? WHERE id = ?");
$sqldata = array (serialize($session_data), $PHP_AUTH_USER);
if (!odbc_execute ($stmt, &$sqldata)) {
if (!odbc_execute ($stmt, &amp;$sqldata)) {
$stmt = odbc_prepare($conn,
"INSERT INTO sessions (id, data) VALUES(?, ?)");
if (!odbc_execute($stmt, &$sqldata)) {
if (!odbc_execute($stmt, &amp;$sqldata)) {
/* Something went wrong. Bitch, whine and moan. */
}
}
@ -1076,7 +1076,7 @@ $array = unpack ("c2chars/nint", $binarydata);
$conn = odbc_connect ("webdb", "php", "chicken");
$stmt = odbc_prepare ($conn, "SELECT data FROM sessions WHERE id = ?");
$sqldata = array ($PHP_AUTH_USER);
if (!odbc_execute ($stmt, &$sqldata) || !odbc_fetch_into ($stmt, &$tmp)) {
if (!odbc_execute ($stmt, &amp;$sqldata) || !odbc_fetch_into ($stmt, &amp;$tmp)) {
// if the execute or fetch fails, initialize to empty array
$session_data = array();
} else {