<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP Reference Book Blog &#187; Corrections</title>
	<atom:link href="http://www.phpreferencebook.com/category/corrections/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpreferencebook.com</link>
	<description>PHP Reference: Beginner to Intermediate PHP5</description>
	<lastBuildDate>Sat, 03 Jul 2010 04:04:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>fwrite() has a Double Tip that is Misplaced</title>
		<link>http://www.phpreferencebook.com/corrections/fwrite-double-tip-misplaced/</link>
		<comments>http://www.phpreferencebook.com/corrections/fwrite-double-tip-misplaced/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 12:00:09 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Corrections]]></category>
		<category><![CDATA[fread]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[fwrite]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=346</guid>
		<description><![CDATA[On page 131, the fwrite() function has a TIP that reads: &#160; To read the entire file into a string, use the function filesize(). // file.txt contains the sentence: Hello World! $filename = 'file.txt'; $file = fopen&#40;$filename, 'r'&#41;; $string = fread&#40; $file, filesize&#40;$filename&#41; &#41;; var_dump&#40;$string&#41;; // file.txt now contains at the end: Hello World! You&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>On page 131, the fwrite() function has a TIP that reads:<br />
&nbsp;<br />
<strong>To read the entire file into a string, use the function filesize().</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// file.txt contains the sentence: Hello World!</span>
<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'file.txt'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// file.txt now contains at the end: Hello World!</span></pre></div></div>

<p>You&#8217;ll notice that this is the same tip as fread() and doesn&#8217;t belong. It should be considered &#8216;removed&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/corrections/fwrite-double-tip-misplaced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Index: array_combine() array_key_exists()</title>
		<link>http://www.phpreferencebook.com/corrections/index-preg_match_all-array_combine-chdir-array_key_exists/</link>
		<comments>http://www.phpreferencebook.com/corrections/index-preg_match_all-array_combine-chdir-array_key_exists/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 08:04:18 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Corrections]]></category>
		<category><![CDATA[array_combine]]></category>
		<category><![CDATA[array_key_exists]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[preg_match_all]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=337</guid>
		<description><![CDATA[Some quick corrections for the Function Index: pg. 162 preg_match_all: 157-158 pg. 161 array_combine: 73 array_key_exists: 79-80]]></description>
			<content:encoded><![CDATA[<p>Some quick corrections for the Function Index:</p>
<h3>pg. 162</h3>
<p>preg_match_all: <strong>157-158</strong></p>
<h3>pg. 161</h3>
<p>array_combine: <strong>73</strong><br />
array_key_exists: <strong>79-80</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/corrections/index-preg_match_all-array_combine-chdir-array_key_exists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>array_key_exists() Function Index Correction</title>
		<link>http://www.phpreferencebook.com/corrections/array_key_exists-function-index/</link>
		<comments>http://www.phpreferencebook.com/corrections/array_key_exists-function-index/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 03:38:43 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Corrections]]></category>
		<category><![CDATA[array_key_exists]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=101</guid>
		<description><![CDATA[Thanks to John for submitting this correction! In the Function Index (pg. 161), array_key_exists() is listed as page 82. However, it is actually on page 79. Feel free to submit a correction yourself if you find any!]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://www.phpreferencebook.com/corrections/comment-page-1/#comment-37">John</a> for submitting this <a href="http://www.phpreferencebook.com/category/corrections/">correction</a>!</p>
<p>In the Function Index (pg. 161), array_key_exists() is listed as page 82. However, it is actually on page 79.</p>
<p>Feel free to <a href="http://www.phpreferencebook.com/corrections/">submit a correction</a> yourself if you find any!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/corrections/array_key_exists-function-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Print_r optional parameter correction</title>
		<link>http://www.phpreferencebook.com/corrections/print_r-return-parameter/</link>
		<comments>http://www.phpreferencebook.com/corrections/print_r-return-parameter/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 05:21:35 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Corrections]]></category>
		<category><![CDATA[print_r]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=81</guid>
		<description><![CDATA[(pg. 38) In the book, the print_r() function is described as follows: print_r($variable) Output the contents of $variable . Typically used to display the contents of an array. However, there is also an optional flag for the print_r() function that makes the function return the output rather than printing it to the screen. Therefore, the [...]]]></description>
			<content:encoded><![CDATA[<h3>(pg. 38)</h3>
<p>In the book, the print_r() function is described as follows:</p>
<div style="color: #ffffff; background-color:#000;">print_r($variable)</div>
<p><span style="background-color: #DDD;">Output the contents of <strong>$variable</strong> . Typically used to display the contents of an array.</p>
<p></span></p>
<p>However, there is also an optional flag for the print_r() function that makes the function return the output rather than printing it to the screen. Therefore, the section of the book should be amended as follows:</p>
<div style="color: #ffffff; background-color:#000;">print_r($variable [,<em>return</em>])</div>
<p><span style="background-color: #DDD;"><em>return</em> – [optional] <strong>$boolean</strong> <em>default:</em> FALSE, print output<br />
Output the contents of <strong>$variable</strong>. Typically used to display the contents of an array. If <em>return</em> is set to TRUE, print_r() returns the output rather than displaying it, such as when storing it in a variable.</p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/corrections/print_r-return-parameter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql_result() correction</title>
		<link>http://www.phpreferencebook.com/corrections/mysql_result-correction/</link>
		<comments>http://www.phpreferencebook.com/corrections/mysql_result-correction/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 01:25:40 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Corrections]]></category>
		<category><![CDATA[correction]]></category>
		<category><![CDATA[mysql_result]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=37</guid>
		<description><![CDATA[(pg. 123) The function has the following correct syntax: mysql_result(resource, row[, column]) However, in the explanation paragraph, 2nd sentence, it uses the term field erroneously instead of the term column. It should read as follows: If column is specified instead of the value of the first column, the specified column is retrieved (can be referenced [...]]]></description>
			<content:encoded><![CDATA[<h3>(pg. 123)</h3>
<p>The function has the following <strong>correct </strong>syntax:</p>
<blockquote><p>mysql_result(<em>resource</em>, <em>row</em>[, <em>column</em>])</p></blockquote>
<p>However, in the explanation paragraph, 2<sup>nd</sup> sentence, it uses the term <em>field </em>erroneously instead of the term <em>column</em>. It should read as follows:</p>
<blockquote><p>If <em>column </em>is specified instead of the value of the<br />
first column, the specified <em>column </em>is retrieved (can be referenced by number<br />
starting with 0 or by name/alias).</p></blockquote>
<p>It&#8217;s the little things, like changing the term used to be clearer to the reader and forgetting to update everything.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/corrections/mysql_result-correction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RegEx PERL Compatible Character Class \w</title>
		<link>http://www.phpreferencebook.com/corrections/backslash-w/</link>
		<comments>http://www.phpreferencebook.com/corrections/backslash-w/#comments</comments>
		<pubDate>Sat, 31 May 2008 02:11:43 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Corrections]]></category>
		<category><![CDATA[alphanumeric]]></category>
		<category><![CDATA[PCRE]]></category>
		<category><![CDATA[PERL]]></category>
		<category><![CDATA[preg]]></category>
		<category><![CDATA[preg_replace]]></category>
		<category><![CDATA[regular expression]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=13</guid>
		<description><![CDATA[(pg. 150) Book version: \w &#8211; Letter (a-z, A-Z) Correct version: \w &#8211; Letter, Digit, Underscore [a-zA-Z0-9_] This is similar to the syntax for alphanumeric: [:alnum:]]]></description>
			<content:encoded><![CDATA[<h3>(pg. 150)</h3>
<p>Book version:</p>
<p>\w &#8211; Letter (a-z, A-Z)</p>
<p>Correct version:</p>
<p>\w &#8211; Letter, Digit, Underscore [a-zA-Z0-9_]</p>
<p>This is similar to the syntax for alphanumeric: [:alnum:]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/corrections/backslash-w/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>$_SERVER[&#039;QUERY_STRING&#039;] in Global Variables</title>
		<link>http://www.phpreferencebook.com/corrections/_serverquery_string/</link>
		<comments>http://www.phpreferencebook.com/corrections/_serverquery_string/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 04:50:37 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Corrections]]></category>
		<category><![CDATA[$_SERVER]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[query string]]></category>
		<category><![CDATA[query_string]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=8</guid>
		<description><![CDATA[(pg. 33) The description in the book reads: $_SERVER['QUERY_STRING'] – The current scripts path This description is the same as the entry above, because I made a bad edit (copy/paste for formatting). The correct description would be as follows: $_SERVER['QUERY_STRING'] – The current query string (without the question mark) The example is correct and accurate, [...]]]></description>
			<content:encoded><![CDATA[<h3>(pg. 33)</h3>
<p>The description in the book reads:</p>
<blockquote><p>$_SERVER['QUERY_STRING'] – The current scripts path</p></blockquote>
<p>This description is the same as the entry above, because I made a bad edit (copy/paste for formatting). The correct description would be as follows:</p>
<blockquote><p>$_SERVER['QUERY_STRING'] – The current query string (without the question mark)</p></blockquote>
<p>The example is correct and accurate, and luckily this is painfully obvious thanks to the name of the key <em>QUERY_STRING </em>in the $_SERVER array.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/corrections/_serverquery_string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
