<?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; Miscellaneous</title>
	<atom:link href="http://www.phpreferencebook.com/category/misc/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>SEOMoz &#8211; Third-Party Affiliate Programs</title>
		<link>http://www.phpreferencebook.com/misc/roll-your-own-affiliate-program/</link>
		<comments>http://www.phpreferencebook.com/misc/roll-your-own-affiliate-program/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 23:45:16 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[seomoz]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=320</guid>
		<description><![CDATA[The following is a translation of ASP code to PHP for the following SEOMoz post: Third-Party Affiliate Programs: Roll Your Own Instead 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 &#60;?php $AffiliateID = trim&#40;$_GET&#91;'affid'&#93;&#41;; &#160; $CanonicalURL = $_SERVER&#91;'SERVER_NAME'&#93; . $_SERVER&#91;'SCRIPT_NAME'&#93;; &#160; if &#40;strlen&#40;$AffiliateID&#41; &#62; 0&#41; &#123; $CanonicalURL [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a translation of ASP code to PHP for the following SEOMoz post:<br />
<a href="http://www.seomoz.org/blog/roll-your-own-affiliate-program">Third-Party Affiliate Programs: Roll Your Own Instead</a></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$AffiliateID</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'affid'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$CanonicalURL</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SCRIPT_NAME'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$AffiliateID</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$CanonicalURL</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;affid=&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$AffiliateID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$CanonicalURL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$CanonicalURL</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;affid=&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$AffiliateID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$CanonicalURL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;AffiliateID&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$AffiliateID</span><span style="color: #339933;">,</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">90</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
...
&nbsp;
&lt;link rel=&quot;canonical&quot; href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$CanonicalURL</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/misc/roll-your-own-affiliate-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon Kindle (US Edition) now $259</title>
		<link>http://www.phpreferencebook.com/misc/amazon-kindle-us-259/</link>
		<comments>http://www.phpreferencebook.com/misc/amazon-kindle-us-259/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 12:53:03 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=300</guid>
		<description><![CDATA[Amazon has dropped the price again on their original 6&#8243; U.S. Kindle ebook reader to $259. They have also introduced a discount on their International Wireless Kindle edition making it $279. Previously, there was a Kindle price reduction of $299. Now you can carry around your reference book and more for the same weight and [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon has dropped the price again on their original 6&#8243; <a href="http://www.amazon.com/gp/product/B00154JDAI?tag=phpreferencebook-20">U.S. Kindle ebook reader</a> to <strong>$259</strong>. They have also introduced a discount on their <a href="http://www.amazon.com/gp/product/B0015T963C?tag=phpreferencebook-20">International Wireless Kindle</a> edition making it <strong>$279</strong>. Previously, there was a Kindle price reduction of $299. Now you can carry around your reference book and more for the same weight and dimensions as a copy of just the PHP reference book! Sleek and lightweight, <a href="http://www.amazon.com/gp/product/B00154JDAI?tag=phpreferencebook-20">Kindle</a> is as thin as a typical magazine and holds over 1,500 books.  An advanced display reads like real paper and boasts 16 shades of gray for clear text and crisp images. The current generation has improved page refresh: faster page flips as the e-ink changes the entire page. Even better, small changes to the page don&#8217;t require a full refresh (the black-white flash) of the entire page!</p>
<p>A kindle version of PHP Reference: Beginner to Intermediate PHP5 is available for <a href="http://www.amazon.com/gp/product/B001B3HULC?ie=UTF8&#038;tag=phpreferencebook-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B001B3HULC">$8.99 through Amazon.com</a>, at just over half the price of the main book!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/misc/amazon-kindle-us-259/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon Kindle Reduced Price to $299</title>
		<link>http://www.phpreferencebook.com/misc/amazon-kindle-reduced-price/</link>
		<comments>http://www.phpreferencebook.com/misc/amazon-kindle-reduced-price/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 13:44:19 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=273</guid>
		<description><![CDATA[Amazon has dropped the price on their original 6&#8243; Kindle e-book reader to $299. Now you can carry around your reference book and more for the same weight and dimensions as a copy of just the PHP reference book! Sleek and lightweight, Kindle is as thin as a typical magazine and holds over 1,500 books. [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon has dropped the price on their original 6&#8243; <a href="http://www.amazon.com/gp/product/B00154JDAI?tag=phpreferencebook-20">Kindle e-book reader</a> to <strong>$299</strong>. Now you can carry around your reference book and more for the same weight and dimensions as a copy of just the PHP reference book! Sleek and lightweight, <a href="http://www.amazon.com/gp/product/B00154JDAI?tag=phpreferencebook-20">Kindle</a> is as thin as a typical magazine and holds over 1,500 books.  An advanced display reads like real paper and boasts 16 shades of gray for clear text and crisp images. The current generation has improved page refresh: faster page flips as the e-ink changes the entire page. Even better, small changes to the page don&#8217;t require a full refresh (the black-white flash) of the entire page!</p>
<p>A kindle version of PHP Reference: Beginner to Intermediate PHP5 is available for <a href="http://www.amazon.com/gp/product/B001B3HULC?ie=UTF8&#038;tag=phpreferencebook-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B001B3HULC">$3.99 through Amazon</a>, the lowest priced general PHP book available!</p>
<p>If you are more interested in the larger format <a href="http://www.amazon.com/gp/product/B0015TCML0?ie=UTF8&#038;tag=phpreferencebook-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B0015TCML0">Kindle DX</a>  9.7&#8243; model, it includes much better support for PDF files. You can then load the <a href="http://www.phpreferencebook.com/pdf/">free PDF version</a> of the PHP Book onto your DX at no additional cost!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/misc/amazon-kindle-reduced-price/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>8000+ downloads of PHP Book PDF!</title>
		<link>http://www.phpreferencebook.com/author-notes/8000-downloads-php-book-pdf/</link>
		<comments>http://www.phpreferencebook.com/author-notes/8000-downloads-php-book-pdf/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:06:55 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Author Notes]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[revenue]]></category>
		<category><![CDATA[self-publishing]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=261</guid>
		<description><![CDATA[Since tracking, over 8000 copies of this PHP book&#8217;s free PDF have been downloaded through lulu.com as well as directly through this book blog! This doesn&#8217;t include the downloads through other websites who are also hosting the PDF file completely legally. To date, there have also been 97 revenue generating print copies of the paperback [...]]]></description>
			<content:encoded><![CDATA[<p>Since tracking, over 8000 copies of this PHP book&#8217;s free PDF have been downloaded through <a href="http://www.phpreferencebook.com/ref">lulu.com</a> as well as <a href="http://www.phpreferencebook.com/pdf/">directly</a> through this book blog! This doesn&#8217;t include the downloads through other websites who are also hosting the PDF file completely legally.</p>
<p>To date, there have also been 97 revenue generating print copies of the paperback sold and 60 digital Kindle editions sold. The majority of sales are through Amazon.com, generating a lot less income per book than copies sold through lulu.com. </p>
<ul>
<li><strong>Total Revenue (all sources):</strong> $501.18</li>
<li><strong>Costs to create the book:</strong> ~$600<br />
(computer monitor, ISBN, review copies, office space rent, etc.)</li>
<li><strong>Hours spent writing: 175</strong></li>
</ul>
<p>In other words, with costs included, I&#8217;ve <strong>lost ~$100</strong> creating the book. If that was <strong>not</strong> factored in, the hourly wage for creating the book so far would be $2.86/hour <em>(in reality it is $0.00)</em>. </p>
<p>With over 8,000 downloads which are and will always remain free in PDF form, a donation of $1 for each download would have changed it to ~$33/hour. Would you consider <a href="http://www.phpreferencebook.com/purchase/">purchasing</a> a paperback PHP book copy today or <a href="http://www.dreamhost.com/donate.cgi?id=11264">donating to my hosting costs</a> when <a href="http://www.phpreferencebook.com/pdf/">downloading a free PDF</a> of the PHP reference book? Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/author-notes/8000-downloads-php-book-pdf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Save 10% on Lulu.com Orders in May!</title>
		<link>http://www.phpreferencebook.com/misc/save-lulu-book-orders-may/</link>
		<comments>http://www.phpreferencebook.com/misc/save-lulu-book-orders-may/#comments</comments>
		<pubDate>Thu, 14 May 2009 17:33:20 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=244</guid>
		<description><![CDATA[Lulu.com, the publisher of the PHP Book are offering a 10% discount to purchasers during the month of April! Purchases made through Lulu.com provide me, the author, 241% more of the revenue. In other words, instead of a separate website getting ~50% of the sold value, and myself getting a small percentage of the other [...]]]></description>
			<content:encoded><![CDATA[<p><a title="lulu.com" href="http://www.lulu.com/content/2251731">Lulu.com</a>, the publisher of the PHP Book are offering a 10% discount to purchasers during the month of <strong>April</strong>! Purchases made through Lulu.com provide me, the author, <strong>241% more of the revenue</strong>.<br />
In other words, instead of a separate website getting ~50% of the sold value, and myself getting a small percentage of the other 50%, I actually gain a lot more for, well, my work and time in creating the book!<br />
&nbsp;</p>
<p>Simply go to <a title="lulu.com" href="http://www.lulu.com/content/2251731">Lulu.com</a>, click “Buy”, and enter code ‘<strong>BEACHREAD</strong>’ at checkout to save 10% ($16.17 total, without shipping)!<br />
Hurry, the offer expires on <em>May 31st, 2010</em>!<br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/misc/save-lulu-book-orders-may/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Errors &#8211; 10 Common Mistakes</title>
		<link>http://www.phpreferencebook.com/misc/php-errors-common-mistakes/</link>
		<comments>http://www.phpreferencebook.com/misc/php-errors-common-mistakes/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 05:30:41 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[php errors]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=136</guid>
		<description><![CDATA[ol li {margin-top: 50px;} Everyone makes mistakes when writing PHP code no matter your experience level. There are many common mistakes that sometimes are not immediately clear when looking at the error that PHP displays. First and foremost, when debugging PHP code, make sure you include the proper code to Display PHP Errors. Each item [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
ol li {margin-top: 50px;}
</style>
<div style="float:right;"><script type="text/javascript" src="http://www.reddit.com/button.js"></script></div>
<div class="alignright" style="clear:right;"><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div>
<p>Everyone makes mistakes when writing PHP code no matter your experience level. There are many common mistakes that sometimes are not immediately clear when looking at the error that PHP displays. First and foremost, when debugging PHP code, make sure you include the proper code to <a href="http://www.phpreferencebook.com/tips/display-all-php-errors-and-warnings/">Display PHP Errors</a>.<br />
Each item will be organized by the PHP error itself, followed by chunks of invalid code that will be used as the baseline for the common mistakes, and finally the corrected code and solution will be presented.</p>
<ol>
<li>
<h3>Parse error: syntax error, unexpected &#8216;}&#8217; &#8230; on line 62</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$assoc_array</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$key</span> contains <span style="color: #006699; font-weight: bold;">$value</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'name'</span><span style="color: #339933;">:</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Name found!'</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'age'</span><span style="color: #339933;">:</span>			
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Age found!'</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'No Case found!'</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>When you forget an opening curly brace &#8216;{&#8216;, or if you have an extra closing curly brace, this error is generated at the closing brace, referred to in the above example as line 62. Many frameworks and syntax highlighters such as <a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a> will assist you in finding the matching brace by simply placing your cursor next to a curly brace.</p>
<p><strong><em>Answer:</em></strong> Add the opening brace to the end of line 48:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>48
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$assoc_array</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<li>
<h3>Parse error: syntax error, unexpected $end &#8230; on line 63</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$assoc_array</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$key</span> contains <span style="color: #006699; font-weight: bold;">$value</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'name'</span><span style="color: #339933;">:</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Name found!'</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'age'</span><span style="color: #339933;">:</span>			
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Age found!'</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'No Case found!'</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>On the opposite end of the spectrum, forgetting a closing curly brace &#8216;}&#8217; will generate this obscure error. Obscure because the line number refers to the bottom of the page. It is unable to identify the closing of the control structure.</p>
<p><strong><em>Answer:</em></strong> Add the closing brace for the switch that begins on line 51. In the sample code, the brace is missing from line 61:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>58
59
60
61
62
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'No Case found!'</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<li>
<h3>Parse error: syntax error, unexpected &#8216;{&#8216; &#8230; on line 42</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>42
43
44
45
46
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$numeric</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Equal to 1'</span><span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Not equal to 1'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>While this may seem obvious with the simplified example above, this comes up very often when you have functions nested inside of the evaluated expression of a control structure. For a momentary detour, here is an example of the exact situation that could easily lead to this error. <em>Note: This sample code would also generate the same error.</em></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$numeric</span> <span style="color: #339933;">==</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Equal to 1'</span><span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Not equal to 1'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The error is generated because of a missing closing parenthesis &#8216;)&#8217;. In the above cases, the missing character is the matched pair to the opening parenthesis &#8216;(&#8216; that encompasses the evaluated expression. In the very first line, you can count 3 &#8216;(&#8216; and only 2 &#8216;)&#8217;, causing PHP to reach an unexpected curly brace which begins the behaviour when the expression is evaluated as TRUE. </p>
<p><strong><em>Answer:</em></strong> Add the closing parenthesis to line 42.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>42
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$numeric</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<li>
<h3>Parse error: syntax error, unexpected T_VARIABLE &#8230; on line 38</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>37
38
39
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$num_array</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span>
<span style="color: #000088;">$get_test</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'test'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$escaped</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'A great movie is \'Shawshank Redemption\', in my humble opinion.'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The error has identified the variable <strong>$get_test</strong> on line 38 and is surprised by its presence suddenly! Why? Because the most important character in all PHP programming is missing, and as soon as it reaches the next item, it throws out the error, the specific error because the next item is a variable. It is reading the line as if it was written:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$num_array</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #000088;">$get_test</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'test'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong><em>Answer: </em></strong>There is a semicolon missing after the 5 on line 37, closing the behaviour of assigning the integer 5 to the next numeric index in the <strong>$num_array</strong> array variable.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>37
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$num_array</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<li>
<h3>Parse error: syntax error, unexpected &#8216;}&#8217;, expecting &#8216;,&#8217; or &#8216;;&#8217; &#8230; on line 44</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>42
43
44
45
46
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$numeric</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Equal to 1'</span>
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Not equal to 1'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Ok, this is the same problem as the previous item in the list, but the error is completely different because of the next element reached by PHP after the missing character. In the above example, PHP identifies the opening curly brace of the else statement.</p>
<p><strong><em>Answer: </em></strong>There is a semicolon missing after the echo statement on line 43, leading PHP to unexpectedly reach the closing brace of the if statement.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>42
43
44
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$numeric</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Equal to 1'</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<li>
<h3>Parse error: syntax error, unexpected &#8216;,&#8217; &#8230; on line 38</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>38
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$escaped</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'A great movie is \'Shawshank Redemption'</span><span style="color: #339933;">,</span> in my humble opinion<span style="color: #339933;">.</span><span style="color: #0000ff;">';</span></pre></td></tr></table></div>

<p>Using a syntax highlighter should make this error very evident, as you notice that the string that is being assigned to the variable <strong>$escaped</strong> changes its coloring midway through. The entire string is surrounded by single quotes, however single quotes are also used inside, and while the first one has been escaped by a backslash so it is evaluated as a single quote character rather than the encapsulating single quotes, it seems that one is missing&#8230;</p>
<p><strong><em>Answer: </em></strong>Escape the 3rd single quote, after Redemption, which in the above example is acting as the closing single quote to identify the string.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>38
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$escaped</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'A great movie is \'Shawshank Redemption\', in my humble opinion.'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<li>
<h3>Parse error: syntax error, unexpected &#8216;=&#8217;, expecting &#8216;)&#8217; &#8230; on line 32</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>32
33
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$assoc_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'John Smith'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'age'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">35</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gender'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'male'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$num_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'three'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'four'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>When defining an array, you can refer to simply the values (and let the index be assigned numerically and automatically) or you can define the key and value pairs. Any other syntax can trigger a parsing error, since PHP is expecting that before placing an equals sign you would close the array.</p>
<p><strong><em>Answer: </em></strong>Line 32 is missing the greater than symbol after the equals sign to define the value for the key &#8216;name&#8217;.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>32
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$assoc_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'John Smith'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'age'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">35</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gender'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'male'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<li>
<h3>Parse error: syntax error, unexpected T_STRING, expecting &#8216;)&#8217; &#8230; on line 32</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>32
33
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$assoc_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=</span> John Smith<span style="color: #339933;">,</span> <span style="color: #0000ff;">'age'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">35</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gender'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'male'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$num_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'three'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'four'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Variable types have specific syntax when assigning the values. Arrays use <em>array()</em>, integers and floats are written directly sans extraneous syntax (<em>e.g.</em> $variable = 12; ), and strings are surrounded by single or double quotes. Neglecting to surround a string with quotations causes PHP to find an unexpected T_STRING and look for a missing character that is part of a control structure or language construct.</p>
<p><strong><em>Answer: </em></strong>John Smith is a string, the value of the key &#8216;name&#8217; (also a string), but was missing quotation marks.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>32
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$assoc_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'John Smith'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'age'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">35</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gender'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'male'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<li>
<h3>Warning: Missing argument 1 for preprint(), called &#8230; on line 27 and defined &#8230; on line 21</h3>
</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> preprint<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parray</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$nl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;pre&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$nl</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parray</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$assoc_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'John Smith'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'age'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">35</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gender'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'male'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
preprint<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The error states that a function, called on line 27, is missing the first argument (<em>e.g.</em> the elements within the parenthesis), as defined by the function that is created on line 21. When the function is written to expect an argument, and none is provided nor the argument within the function has a default value assigned, a PHP warning is presented. If the function was written as follows, with a default value, the warning would not appear and the default value would be used:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> preprint<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Test'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$nl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;pre&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$nl</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parray</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong><em>Answer: </em></strong>Provide the argument in the function call on line 27.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>26
27
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$assoc_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'John Smith'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'age'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">35</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gender'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'male'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
preprint<span style="color: #009900;">&#40;</span><span style="color: #000088;">$assoc_array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<li>
<h3>Make sure you understand the difference between == and ===</h3>
</li>
<p>Ok, so this last one isn&#8217;t a PHP error, but it bears repeating. Failing to understand the difference and the appropriate usage of equality and identical comparison operators will not generate an error by PHP, but will likely find you debugging your code for a very long time, wondering what is wrong with your data. Make sure you understand the <a href="http://www.phpreferencebook.com/samples/equal-sign-operators/">equals sign in PHP</a>! Remember, the following If statement will always be TRUE because you are assigning the variable rather than evaluating it:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$numeric</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Equal to 1'</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Not equal to 1'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</ol>
<p>PHP can be a cruel mistress, but if you decode the PHP errors and warnings, you&#8217;ll find the total time building your application, website, or school project will be dramatically reduced!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/misc/php-errors-common-mistakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seven Downloads for Young Web Developers</title>
		<link>http://www.phpreferencebook.com/misc/php-download-beginner-web-developer/</link>
		<comments>http://www.phpreferencebook.com/misc/php-download-beginner-web-developer/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 14:54:27 +0000</pubDate>
		<dc:creator>Mario Lurig</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.phpreferencebook.com/?p=121</guid>
		<description><![CDATA[There are tons of books and tutorials on PHP, MySQL, Zend, and SEO on store shelves. There are even more resources found only on the internet. Sometimes you need something in the middle, content you can download legally and keep handy when you are offline. Below are a few completely free resources that most beginner [...]]]></description>
			<content:encoded><![CDATA[<p>There are tons of books and tutorials on PHP, MySQL, Zend, and SEO on store shelves. There are even more resources found only on the internet. Sometimes you need something in the middle, content you can download legally and keep handy when you are offline. Below are a few completely free resources that most beginner or intermediate web developers (even if you do it just for yourself) will find useful.</p>
<h3>PHP</h3>
<p><strong><em>1)</em> PHP Reference: Beginner to Intermediate PHP5</strong></p>
<p><em>Shameless self-promotion.</em> A reference for many of the functions within PHP that serves as a quick go-to resource for checking syntax and remembering the nuances of many of the functions. It is available as a <a href="http://www.phpreferencebook.com/">PHP book</a> you can purchase in print, however the entire book is released under creative commons and available as a <a href="http://www.phpreferencebook.com/pdf">PHP reference PDF</a>.</p>
<p><strong><em>2)</em> Object Oriented PHP Tutorial in PDF</strong></p>
<p>Provided by killerphp.com and Stefan Mischook, this is a PDF version of his article on the topic of object orientated programming in PHP. It gives a conversational explanation to the basics. More information and the <a href="http://www.killerphp.com/articles/object-oriented-php-tutorial-in-pdf/">OOP PHP PDF</a> is available over on <a href="http://www.killerphp.com">killerphp.com</a>.</p>
<p><strong><em>3)</em> Zend Framework: Surviving the Deep End</strong></p>
<p>The Zend Framework can help developers organize and write more efficient PHP code for large projects and has become one of the top frameworks used online today. <em>From the page&#8230;</em><br />
<blockquote>&#8220;The book was written to guide readers through the metaphorical &#8216;Deep End&#8217;. It&#8217;s the place you find yourself in when you complete a few tutorials and scan through the Reference Guide, where you are buried in knowledge up to your neck but without a clue about how to bind it all together effectively into an application.&#8221;</p></blockquote>
<p> While available online, there is a link to downloading the PDF version in the bottom right. Check out the <a href="http://www.survivethedeepend.com/">Zend Framework survival guide</a>.</p>
<h3>HTML, CSS, AJAX</h3>
<p><strong><em>4)</em> The Woork Handbook</strong></p>
<p>Another compilation of online articles compiled and organized as an offline document. <em>From the page&#8230;</em><br />
<blockquote>&#8220;The Woork Handbook is a free eBook about CSS, HTML, Ajax, web programming, Mootools, Scriptaculous and other topics about web design&#8230; directly from Woork!&#8221;</p></blockquote>
<p> This isn&#8217;t a full study of any single topic, but is filled with tidbits. Grab the <a href="http://woork.blogspot.com/2009/01/woork-handbook.html">Woork Handbook</a>.</p>
<p><strong><em>5)</em> Added Bytes Cheat Sheets (formerly ILoveJackDaniels)</strong></p>
<p>While the site&#8217;s name has changed, the great resources have not. Cheat sheets are designed to cram (in a useful way) tons of information into the front and back of an 8.5&#8243; x 11&#8243; sheet of paper. There is little excuse for not keeping these handy. Grab the <a href="http://www.addedbytes.com/cheat-sheets/">cheat sheets</a> for HTML, CSS, RegEx, Mod_Rewrite, and more.</p>
<h3>MySQL</h3>
<p><strong><em>6)</em> MySQL Manual</strong></p>
<p>All MySQL documentation is available as a downloadable file. Choose from various options for the <a href="http://dev.mysql.com/doc/">MySQL documentation</a>.<br />
<strong><em>Editor&#8217;s Note: </strong>I had trouble finding a good, free, legal resource for MySQL that wasn&#8217;t hyper specific and was user friendly. I hope others have suggestions they can leave in the comments.</em></p>
<h3>SEO (Search Engine Optimization)</h3>
<p><strong><em>7)</em> Beginner&#8217;s Guide to Search Engine Optimization</strong></p>
<p>SEOMoz.org is an amazing website for learning the complex world of SEO with a very clear, user-friendly tone. Besides that, they offer a bunch of tools for helping your new website get better in the eyes of search engines (aka Google). Available as HTML, MS Word, or an OpenOffice document, you can get a copy of the <a href="http://www.seomoz.org/article/beginners-guide-to-search-engine-optimization">Beginner&#8217;s Guide to Search Engine Optimization</a> over on <a href="http://www.seomoz.org/">SEOMoz.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpreferencebook.com/misc/php-download-beginner-web-developer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
