<?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 Doctor</title>
	<atom:link href="http://phpdoctor.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://phpdoctor.net</link>
	<description>PHP Help and PHP Tutorials</description>
	<lastBuildDate>Wed, 13 Jan 2010 04:04:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Closing PHP Tag Not Needed</title>
		<link>http://phpdoctor.net/?p=8</link>
		<comments>http://phpdoctor.net/?p=8#comments</comments>
		<pubDate>Fri, 01 Jan 2010 15:14:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[closing tag]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://phpdoctor.net/?p=8</guid>
		<description><![CDATA[When developing PHP scripts, I often find people logging &#8216;bugs&#8217; about missing closing PHP tags. i.e. ?&#62;
I want to make something clear, this is not a requirement unless you plan to stop PHP and output HTML. The following is a 100% valid PHP file:
&#60;?php
echo "Hello, World!";

Why do it? The best reason of all is to [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>When developing PHP scripts, I often find people logging &#8216;bugs&#8217; about missing closing PHP tags. i.e. ?&gt;</p>
<p>I want to make something clear, this is not a requirement unless you plan to stop PHP and output HTML. The following is a 100% valid PHP file:</p>
<pre>&lt;?php
echo "Hello, World!";
</pre>
<p>Why do it? The best reason of all is to prevent unintended whitespace. If you have a closing PHP tag and plan to use the header() function at all (or any function that outputs a header), you need to be careful you don&#8217;t have newlines or spaces after your closing PHP tag (headers need to be sent before ANY output, including spaces and newlines). The best solution is to kill the closing PHP tag, so that nothing is output without you intending it.</p>
<p><strong>Update:</strong> Another point for no closing PHP tags is security. I&#8217;ve seen numerous sites that have spam links injected into them. Usually the spammer gets access to the server through a vulnerability somewhere and injects all index.php files with HTML at the end. If you do not have a closing PHP tag, the HTML will generate a parse error and never be output. The spammer loses, and you find out straight away that something is wrong on your site!</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://phpdoctor.net/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick function lookup on PHP.net</title>
		<link>http://phpdoctor.net/?p=5</link>
		<comments>http://phpdoctor.net/?p=5#comments</comments>
		<pubDate>Tue, 11 Aug 2009 13:54:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[handy tips]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php.net]]></category>

		<guid isPermaLink="false">http://phpdoctor.net/?p=5</guid>
		<description><![CDATA[This is a quick and very handy method for looking up functions on php.net. As a PHP programmer, you&#8217;ll find yourself constantly consulting the php.net website. Often arguments are in different orders with different functions and it can be hard to remember them all. PHP.net has a convienent method for looking up functions.
To look up [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>This is a quick and <em>very</em> handy method for looking up functions on php.net. As a PHP programmer, you&#8217;ll find yourself constantly consulting the php.net website. Often arguments are in different orders with different functions and it can be hard to remember them all. PHP.net has a convienent method for looking up functions.</p>
<p>To look up a function name, type this into your web browser:</p>
<p>http://www.php.net/functionname</p>
<p>For example, to look up the function in_array you&#8217;d type:</p>
<p><a href="http://www.php.net/in_array">http://www.php.net/in_array</a></p>
<p>Handy, eh?</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://phpdoctor.net/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to display HTML source code</title>
		<link>http://phpdoctor.net/?p=3</link>
		<comments>http://phpdoctor.net/?p=3#comments</comments>
		<pubDate>Tue, 11 Aug 2009 13:50:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://phpdoctor.net/?p=3</guid>
		<description><![CDATA[Problem: You want to display HTML on your website so that your visitors can see it. E.g. You might have a tutorial page.
Solution: Use the htmlspecialchars function.
This function will encode all characters in the string passed into it so that the final output will be displayed literally on a HTML page.
For example:
If you just placed [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><strong>Problem: </strong>You want to display HTML on your website so that your visitors can see it. E.g. You might have a tutorial page.</p>
<p><strong>Solution: </strong>Use the htmlspecialchars function.</p>
<p>This function will encode all characters in the string passed into it so that the final output will be displayed literally on a HTML page.</p>
<p>For example:</p>
<p>If you just placed the following into a page:</p>
<p>&lt;b&gt;Example Text&lt;/b&gt;</p>
<p>You&#8217;d just end up with:</p>
<p><strong>Example Text</strong></p>
<p>So, instead use:</p>
<pre>&lt;?php
echo htmlspecialchars('&lt;b&gt;Example Text&lt;/b&gt;', ENT_QUOTES, 'utf-8');
?&gt;</pre>
<p>Then you&#8217;ll get output like:</p>
<p>&lt;b&gt;Example Text&lt;/b&gt;</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://phpdoctor.net/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
