<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>AwesomePHP&#039;s Tutorials</title>
	<atom:link href="http://awesomephp.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://awesomephp.wordpress.com</link>
	<description>My YouTube Tutorials, with writing!</description>
	<lastBuildDate>Tue, 01 Jun 2010 17:40:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='awesomephp.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>AwesomePHP&#039;s Tutorials</title>
		<link>http://awesomephp.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://awesomephp.wordpress.com/osd.xml" title="AwesomePHP&#039;s Tutorials" />
	<atom:link rel='hub' href='http://awesomephp.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Basics of PHP &#8211; Sessions &amp; Cookies</title>
		<link>http://awesomephp.wordpress.com/2010/06/01/basics-of-php-sessions-cookies/</link>
		<comments>http://awesomephp.wordpress.com/2010/06/01/basics-of-php-sessions-cookies/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 17:32:40 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[sessions]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=112</guid>
		<description><![CDATA[Most of us will have heard of a cookie before, those pesky privacy thieving things which really don&#8217;t taste that great, or not. The truth is cookies are vital to the operation of a website and while being reasonably safe and secure do not divulge that much personal information, at least not the personal information [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=112&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most of us will have heard of a cookie before, those pesky privacy thieving things which really don&#8217;t taste that great, or not. The truth is cookies are vital to the operation of a website and while being reasonably safe and secure do not divulge that much personal information, at least not the personal information that really means anything. In fact about the most personal you can get is asking PHP for the users IP Address, but even that isn&#8217;t totally unique to the user.</p>
<p>Anyway back to cookies, cookies are used to store information about a user in the long run (up to 30 days) and sessions are used to store information about user in the short run (until the browser is closed), a session is technically just a temporary cookie, so we&#8217;ll start there.</p>
<p>Sessions are most commonly used to store login information so that the website knows who a user is. Most commonly when a user logs in PHP will check that the login information entered by a user matches up with that held in the database, if all the information (username &amp; password) is correct a session can be created to store the login user ID, this way the site will now know that you have logged in and can view certain content.</p>
<p>Storing something as a session is easy.</p>
<p><pre class="brush: php;">&lt;?php

//Start the session
session_start();

//Record my name
$_SESSION['my_name'] = 'James';

?&gt;</pre></p>
<p>Let&#8217;s split this example into two parts, starting with session_start(). session_start() is a function to tell PHP you are about to use the PHP session functionality, whenever you want to add, edit, view or delete a session you must have already used the session_start() function, further this function has to appear before anything gets outputted to the browser (eg. text, even spaces or new lines).</p>
<p>The second part of this sets the session, the name of the session variable is placed between quotes inside the square brackets. The value of the session is then set after the equals operator (=).</p>
<p>To view the content of this session you would do the following&#8230;</p>
<p><pre class="brush: php;">&lt;?php

//Start the session
session_start();

//Display my name
echo $_SESSION['my_name'];

?&gt;</pre></p>
<p>Which would output&#8230;</p>
<p><pre class="brush: plain;">James</pre></p>
<p>Any sort of variable (including a session variable) can be cleared by using the unset() function.</p>
<p><pre class="brush: php;">&lt;?php

session_start();

unset($_SESSION['my_name']);

?&gt;</pre></p>
<p>There&#8217;s also a quick and easy way to delete all session content, session_destroy().</p>
<p><pre class="brush: php;">&lt;?php

session_start();

session_destroy();

?&gt;</pre></p>
<p>All session data has now been deleted.</p>
<p>Next up is the cookie, for whatever reason you might want to record information for the user over a fixed amount of time (seconds to a month). To do this we use the setcookie() function in PHP.</p>
<p><pre class="brush: php;">&lt;?php

setcookie('my_name', 'James', time() + 3600, '/');

?&gt;</pre></p>
<p>Let&#8217;s talk about the parameters, first we have the cookie name &#8216;my_name&#8217;, second we have the cookie value &#8216;James&#8217;, third we have the timestamp for when the cookie should expire. The time() function grabs the amount of seconds that have passed since Unix time (1st Jan 1970), we then add 3600 seconds onto that (3600 seconds = 1 hour) to make the cookie expire one hour from now, finally we set the cookie to be available on all folders on the domain by using &#8216;/&#8217;.</p>
<p>To display the contents of this cookie we would do&#8230;</p>
<p><pre class="brush: php;">&lt;?php

//Display my name
echo $_COOKIE['my_name'];

?&gt;</pre><br />
To delete the contents of this cookie we have to set the cookie to expire in the past&#8230;<pre class="brush: php;">&lt;?php

setcookie('my_name', 'James', time() - 1, '/');

?&gt;</pre></p>
<p>As the cookie will have expired one second ago the contents of it are now lost.</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=112&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/06/01/basics-of-php-sessions-cookies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; While &amp; For</title>
		<link>http://awesomephp.wordpress.com/2010/06/01/basics-of-php-while-for/</link>
		<comments>http://awesomephp.wordpress.com/2010/06/01/basics-of-php-while-for/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 12:54:39 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[conditional]]></category>
		<category><![CDATA[conditional statements]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[operators]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php for]]></category>
		<category><![CDATA[php if]]></category>
		<category><![CDATA[php loop]]></category>
		<category><![CDATA[php operator]]></category>
		<category><![CDATA[php operators]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>
		<category><![CDATA[php while]]></category>
		<category><![CDATA[statements]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=99</guid>
		<description><![CDATA[During the tutorial Basics of PHP &#8211; MySql Query (Select) We used the &#8216;while&#8217; loop, but we didn&#8217;t really talk about what it does that much. Essentially &#8217;while&#8217; and &#8216;for&#8217; allow us to do something over and over again, quickly and easily. First let&#8217;s look at this &#8216;while&#8217; example. In a way &#8216;while&#8217; and &#8216;for&#8217; are similar [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=99&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>During the tutorial <a href="http://awesomephp.wordpress.com/2010/05/28/basics-of-php-querying-a-database-select/" target="_blank">Basics of PHP &#8211; MySql Query (Select)</a> We used the &#8216;while&#8217; loop, but we didn&#8217;t really talk about what it does that much. Essentially &#8217;while&#8217; and &#8216;for&#8217; allow us to do something over and over again, quickly and easily. First let&#8217;s look at this &#8216;while&#8217; example.</p>
<p><pre class="brush: php;">&lt;?php

$counter = 1;

while($counter &lt;= 10) {

echo 'Number ' . $counter . '&lt;br /&gt;';

$counter ++;

}

?&gt; </pre></p>
<p>In a way &#8216;while&#8217; and &#8216;for&#8217; are similar to &#8216;if&#8217;, they are all looking for a condition to be true. In this example we have first set the $counter variable to 1, then we run our &#8216;while&#8217; loop. &#8216;While&#8217; continues to execute the code in between the curly brackets provided the $counter variable is less than or equal to 10. Still following? Provided $counter is less than or equal to 10 PHP will display the text &#8220;Number &#8221; and then the $counter variable (which will be a number between 1 and 10), and then starts a new line. The $counter variable is then incremented by one, so if the counter was 1 it will not be 2, if it was 2 it will now be 3 ect. Then the &#8216;while&#8217; loop runs again, checking if $counter is still less than or equal to 10, eventually (after 10 times to be exact) the $counter variable will reach 10 and the &#8216;while&#8217; loop will not be able to run again. PHP will output this to the browser&#8230;</p>
<p><pre class="brush: plain;">Number 1
Number 2
Number 3
Number 4
Number 5
Number 6
Number 7
Number 8
Number 9
Number 10
</pre><br />
The &#8216;for&#8217; loop is exactly like the &#8216;while&#8217; loop except it simplifies the process of assigning and incrementing a counter, here is an example of a &#8216;for&#8217; loop which will output the same as the previous &#8216;while&#8217; loop.<br />
<pre class="brush: php;">&lt;?php

for($counter = 1; $counter &lt;= 10; $counter ++) {

echo 'Number ' . $counter . '&lt;br /&gt;';

}

?&gt; </pre><br />
You will notice that all the counter settings are set as parameters inside &#8216;for&#8217;, parameters in &#8216;for&#8217; are separated by a semicolon. The first parameter sets the variable name to be used as a counter as well as it&#8217;s starting value, the second parameter sets the condition that &#8216;for&#8217; should continue to run under and the third tells &#8216;for&#8217; what to do after the loop has ran, in this case (and in most) it increments the counter. You will also notice that as the increment is set as a parameter you don&#8217;t need to set the counter to be incremented inside the curly brackets.</pre>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=99&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/06/01/basics-of-php-while-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; MySql Queries Explained</title>
		<link>http://awesomephp.wordpress.com/2010/05/29/basics-of-php-mysql-queries-explained/</link>
		<comments>http://awesomephp.wordpress.com/2010/05/29/basics-of-php-mysql-queries-explained/#comments</comments>
		<pubDate>Sat, 29 May 2010 11:38:28 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql insert]]></category>
		<category><![CDATA[mysql queries]]></category>
		<category><![CDATA[mysql query]]></category>
		<category><![CDATA[mysql select]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php mysql]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=90</guid>
		<description><![CDATA[While this isn&#8217;t strictly exclusive to PHP understanding the insides of a MySql query are vital to any developer, whatever their programming language. In the last couple of tutorials we covered MySql Select and MySql Insert but we didn&#8217;t talk a lot about the query itself, that is what actually appears as a parameter in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=90&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While this isn&#8217;t strictly exclusive to PHP understanding the insides of a MySql query are vital to any developer, whatever their programming language. In the last couple of tutorials we covered MySql Select and MySql Insert but we didn&#8217;t talk a lot about the query itself, that is what actually appears as a parameter in the mysql_query() function (eg. &#8220;select * from people&#8221;). So first let&#8217;s talk about the MySql Select query.</p>
<p><pre class="brush: sql;">select * from people</pre></p>
<p>In this example we are asking MySql to select all the columns from the table people, if you look at the previous tutorial the table people has three columns called contact_id, name &amp; phone_number. By using an asterisks (*) we are asking PHP to select all three of these columns for use.</p>
<p>But what if we don&#8217;t want to read all of the columns. Say we only want to look at &#8216;name&#8217; and &#8216;phone_number&#8217; and don&#8217;t care about &#8216;contact_id&#8217; we can ask MySql only to return certain columns.</p>
<p><pre class="brush: sql;">select `name`, `phone_number` from people</pre></p>
<p>The columns we want MySql to return are specified inside a (`) and separated by commas (,).</p>
<p>We can actually ask MySql to return the results in a certain order, say alphabetically or in numerical order (or the opposite to both these).</p>
<p><pre class="brush: sql;">select `name`, `phone_number` from people order by name asc</pre></p>
<p>&#8216;Order By&#8217; tells MySql we would like the results returned to us in a specific way, &#8216;name&#8217; specifies we would like to order by the &#8216;name&#8217; column and &#8216;asc&#8217; means ascending (starting with &#8216;a&#8217;, then &#8216;b, c, d&#8217; ect or &#8217;1, 2, 3&#8242; ect). We could ask MySql to return the results descending by using &#8216;desc&#8217;.</p>
<p>Let&#8217;s say now we only want MySql to return the phone number for &#8216;John Doe&#8217;.</p>
<p><pre class="brush: sql;">select `name`, `phone_number` from people where name='John Doe' limit 0, 1</pre></p>
<p>Two new things have been introduced here &#8216;where&#8217; and &#8216;limit&#8217;. &#8216;Where&#8217; searches for results which match a parameter, here we are asking MySql to only return results where the column &#8216;name&#8217; is set to &#8216;John Doe&#8217;. &#8216;Limit 0, 1&#8242; means MySql will only return the first result. If we set this to &#8216;limit 0, 2&#8242; MySql will return the first two results. However as there is only one &#8216;John Doe&#8217; MySql can only return one result so even if you set it to &#8216;limit 0, 2&#8242; or you don&#8217;t set a limit at all you will only get the one result back. This is used to tell MySql to stop looking for other &#8216;John Doe&#8217;s, this can cut down on MySql execution time significantly (especially if you have a large table) and make your program run faster.</p>
<p>Now that we have covered &#8216;select&#8217; let&#8217;s talk about &#8216;insert&#8217;. Here we have the example used in the previous tutorial.</p>
<p><pre class="brush: sql;">insert into people (`name`, `phone_number`) values ('John Doe', '555-6725')</pre></p>
<p>Here MySql is being told that we want to insert into the table &#8216;people&#8217; and the columns &#8216;name&#8217; and &#8216;phone_number&#8217; (you should always tell MySql the columns you want to insert into and don&#8217;t use (*) like in mysql select). &#8216;Values&#8217; then tells MySql what the values of &#8216;name&#8217; and &#8216;phone_number&#8217; are, and they are then given in the next set of brackets.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=90&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/05/29/basics-of-php-mysql-queries-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; Querying a Database (Insert)</title>
		<link>http://awesomephp.wordpress.com/2010/05/29/basics-of-php-querying-a-database-insert/</link>
		<comments>http://awesomephp.wordpress.com/2010/05/29/basics-of-php-querying-a-database-insert/#comments</comments>
		<pubDate>Sat, 29 May 2010 10:03:54 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql insert]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php mysql]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=71</guid>
		<description><![CDATA[In the last tutorial we queried our MySql database to select data from it, now we are going to insert data. MySql Insert queries are very easy to use, first of all whenever we want to do something with a database we have to connect to it and select the correct database (refer to previous [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=71&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the last tutorial we queried our MySql database to select data from it, now we are going to insert data. MySql Insert queries are very easy to use, first of all whenever we want to do something with a database we have to connect to it and select the correct database (refer to previous tutorial for more info).</p>
<p><pre class="brush: php;">
&lt;pre&gt;&lt;?php

$mysql_connection = mysql_connect('localhost', 'username', 'password');

//Check for errors
if(!$mysql_connection) {

die('Could not connect to db: ' . mysql_error());

}
//Select database
mysql_select_db('contacts', $mysql_connection);

?&gt;</pre></p>
<p>Like in the last tutorial we are going to be using the contacts table. Now that we have connected and selected we can run our insert query.</p>
<p><pre class="brush: php;">

&lt;pre&gt;&lt;?php

$mysql_connection = mysql_connect('localhost', 'username', 'password');

//Check for errors
if(!$mysql_connection) {

die('Could not connect to db: ' . mysql_error());

}

//Select database
mysql_select_db('contacts', $mysql_connection);

//Insert into database
mysql_query(&quot;insert into people (`name`, `phone_number`) values ('John Doe', '555-6725')&quot;);

?&gt;</pre></p>
<p>Just like when we ran the select query in the last tutorial we use the function mysql_query(). Here we are telling PHP that we want to insert into the table &#8216;people&#8217; and the columns &#8217;name&#8217; and &#8216;phone_number&#8217;, and then we give the values for &#8216;name&#8217; and &#8216;phone_number&#8217; as &#8216;John Doe&#8217; and &#8217;555-6725&#8242;. Every time this script runs PHP will insert this data into the MySql database. Try this by refreshing the page multiple times.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=71&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/05/29/basics-of-php-querying-a-database-insert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; Querying a Database (Select)</title>
		<link>http://awesomephp.wordpress.com/2010/05/28/basics-of-php-querying-a-database-select/</link>
		<comments>http://awesomephp.wordpress.com/2010/05/28/basics-of-php-querying-a-database-select/#comments</comments>
		<pubDate>Fri, 28 May 2010 20:48:18 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql select]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php mysql]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=64</guid>
		<description><![CDATA[Querying a database is where PHP can get fun. If you&#8217;re developing a site chances are you will need a database. Database&#8217;s are often used to hold user information (like login information) or to record visits to the site. Some of the most complex sites have hundreds of tables each recording vital information. In this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=64&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Querying a database is where PHP can get fun. If you&#8217;re developing a site chances are you will need a database. Database&#8217;s are often used to hold user information (like login information) or to record visits to the site. Some of the most complex sites have hundreds of tables each recording vital information.</p>
<p>In this tutorial we will start by learning how to connect to the database and then how to retrieve some information from it (we&#8217;ll be creating a contacts database to record people&#8217;s phone numbers). To join in you will need to have access to a MySql database &amp; phpMyAdmin, if you have installed WAMP then you will already have this on your computer.</p>
<p>The first thing we are going to do is create a new database and call it <em><strong>contacts</strong><span style="font-style:normal;">, inside the contacts database create a table called </span><strong>people</strong><span style="font-style:normal;">. Inside the table you will need to create three columns called </span><strong>contact_id</strong><span style="font-style:normal;">,</span><strong> name </strong><span style="font-style:normal;">&amp;</span><strong> phone_number</strong><span style="font-style:normal;">. contact_id should be set to INT and Auto Increment, name should be set to VARCHAR (200) and phone_number to VARCHAR (20).</span></em></p>
<p><em><span style="font-style:normal;">Now that your database is set up it&#8217;s time to put some info in there, insert a few rows (leave the contact_id blank &#8211; auto increment will automatically assign an ID) of data into the name and phone number, just so that we have something to display in PHP.</span></em></p>
<p>Next we start with the PHP file, first we need to connect to the database. Database connection through MySql uses the mysql_connect() function.</p>
<p><pre class="brush: php;">&lt;?php

$mysql_connection = mysql_connect('localhost', 'username', 'password');

?&gt;</pre></p>
<p>This should be reasonably straightforward, replace localhost with the IP address of your MySql database (or leave it as localhost if that is what you are using, remember to keep the quotes in place) and then replace username and password with your MySql login information, remember to keep the quotes in place. You may also  be wondering why we have assigned the connection to the variable $mysql_connection, we have done this so that we can use the connection multiple times in the future in different functions like mysql_select_db() and mysql_error(), these two functions require the mysql_connect() details in order to work so we have made it easy on ourselves by storing mysql_connect() in a variable.</p>
<p>Now would be a good time to check have PHP check that those login details actually work, one way of doing this is by using mysql_error(). The mysql_error() function displays any MySql errors to the user.</p>
<p><pre class="brush: php;">&lt;?php

$mysql_connection = mysql_connect('localhost', 'username', 'password');

//Check for errors
if(!$mysql_connection) {

die('Could not connect to db: ' . mysql_error());

}

?&gt;</pre></p>
<p>A lot of the above is brand new so let me introduce it. Firstly you may have seen the (!) operator on the previous tutorial, when this operator is used it is asking PHP if the function has returned false instead of true. If the database details did not work then mysql_connect() will have returned false, as we have stored mysql_connect() inside the variable $mysql_connection, $mysql_connection will currently be set to either true or false. In the case that the MySql connection has failed then the code inside the curly brackets is executed. The die() function is used to display a message and then stop the execution of the rest of the page, when you use this PHP will only display what is shown between the brackets (in this case &#8220;Could not connect to db&#8221;&#8230; ect.) and then will not show or do anything else. mysql_error() displays the MySql error and the period (.) in between mysql_error and &#8220;Could not connect to db&#8221; is called a concatenation operator and is used to join things together, more on this later though (don&#8217;t worry about understanding it right now).<br />
So, if no MySql errors appear then the script will move on to the next part, which is to select the database. Previously we have just connected to the MySql server, now we need to tell PHP what database we want to use.</p>
<p><pre class="brush: php;">&lt;?php

$mysql_connection = mysql_connect('localhost', 'username', 'password');

//Check for errors
if(!$mysql_connection) {

die('Could not connect to db: ' . mysql_error());

}
//Select database
mysql_select_db('contacts', $mysql_connection);

?&gt;</pre></p>
<p>Again pretty straightforward, replace &#8216;contacts&#8217; with the name of your database and keep the quotes. We can also use mysql_error() here too if we want to check for errors.<br />
Now that we have connected to the database it&#8217;s time to select some data from our &#8216;people&#8217; table.</p>
<p><pre class="brush: php;">&lt;?php

$mysql_connection = mysql_connect('localhost', 'username', 'password');

//Check for errors
if(!$mysql_connection) {

die('Could not connect to db: ' . mysql_error());

}
//Select database
mysql_select_db('contacts', $mysql_connection);

//Query database
$res = mysql_query(&quot;select `name`, `phone_number` from people&quot;);
while($row = mysql_fetch_array($res)) {

echo 'Name: ';
echo $row['name'];

echo ' Phone Number: ';
echo $row['phone_number'];
echo '&lt;br /&gt;';

}

?&gt;</pre></p>
<p>After running that you should hopefully see your database data being displayed on the website, if so congratulations but hold on, there&#8217;s more.<br />
Just like with mysql_connect() we have stored mysql_query() as $res and mysql_fetch_array() as $row, mysql_fetch_array() loads all the rows into $row to be displayed. While() is a loop that keeps running until everything has been displayed (this will be covered in another tutorial).<br />
Now there&#8217;s one piece of house keeping we can do to keep everything nice and easy, and save us some time. Remember the concatenation operator? Here is the operator in use to make everything much simpler.</p>
<p><pre class="brush: php;">&lt;?php

$mysql_connection = mysql_connect('localhost', 'username', 'password');

//Check for errors
if(!$mysql_connection) {

die('Could not connect to db: ' . mysql_error());

}
//Select database
mysql_select_db('contacts', $mysql_connection);

//Query database
$res = mysql_query(&quot;select `name`, `phone_number` from people&quot;);
while($row = mysql_fetch_array($res)) {

echo 'Name: ' . $row['name'] . ' Phone Number: ' . $row['phone_number'] . ' &lt;br /&gt;';

}

?&gt;</pre></p>
<p>The operator allows us to join a string together with a variable (as many times as we like) inside one echo function, this can be used pretty much everywhere to join string with integers, variables and functions.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=64&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/05/28/basics-of-php-querying-a-database-select/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; Operators</title>
		<link>http://awesomephp.wordpress.com/2010/05/28/basics-of-php-operators/</link>
		<comments>http://awesomephp.wordpress.com/2010/05/28/basics-of-php-operators/#comments</comments>
		<pubDate>Fri, 28 May 2010 16:01:51 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[operators]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php operator]]></category>
		<category><![CDATA[php operators]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=60</guid>
		<description><![CDATA[Operators are pretty key to PHP and are used pretty much everywhere in a PHP program. Operators are symbols which do things to your PHP program, in fact we covered an operator in the second tutorial &#8220;Variables&#8221; (Remember the equals sign (=)) and in the last tutorial with the &#8216;&#38;&#38;&#8217; and &#8216;==&#8217; signs. In fact [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=60&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Operators are pretty key to PHP and are used pretty much everywhere in a PHP program. Operators are symbols which do things to your PHP program, in fact we covered an operator in the second tutorial &#8220;Variables&#8221; (Remember the equals sign (=)) and in the last tutorial with the &#8216;&amp;&amp;&#8217; and &#8216;==&#8217; signs. In fact operators can be used for anything from manipulating and setting variables to performing maths. Here&#8217;s a list of operators and what they do, you don&#8217;t need to know these by memory &#8211; just remember where you can go to find them.</p>
<table style="border:solid 1px #000;" border="1" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td bgcolor="#EAEAEA"><strong>Operator</strong></td>
<td><strong>Name</strong></td>
<td><strong>Example</strong></td>
<td><strong>Explanation</strong></td>
</tr>
<tr>
<td bgcolor="#EAEAEA">=</td>
<td>Equals</td>
<td>$variable = &#8216;content&#8217;;</td>
<td>Set&#8217;s a variable</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">+</td>
<td>Addition</td>
<td>echo 1 + 1;</td>
<td>Adds numbers</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">-</td>
<td>Subtraction</td>
<td>echo 1 &#8211; 1;</td>
<td>Subtracts numbers</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">*</td>
<td>Multiplication</td>
<td>echo 1 * 2;</td>
<td>Multiplies numbers</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">/</td>
<td>Division</td>
<td>echo 4 / 2;</td>
<td>Divides numbers</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">==</td>
<td>Equals To</td>
<td>if($number == 5)</td>
<td>Checking if a variable equals five</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">!=</td>
<td>Not Equal To</td>
<td>if($number != 5)</td>
<td>Checking if a variable is not equal to five</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">&gt;</td>
<td>Greater Than</td>
<td>if($number &gt; 5)</td>
<td>Checking if a variable is greater than five</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">&lt;</td>
<td>Less Than</td>
<td>if($number &lt; 5)</td>
<td>Checking if a variable is less than five</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">&gt;=</td>
<td>Greater Than Or Equal</td>
<td>if($number &gt;= 5)</td>
<td>Checking if a variable is greater than or equal to five</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">&lt;=</td>
<td>Less Than Or Equal</td>
<td>if($number &lt;= 5)</td>
<td>Checking if a variable is less than or equal to five</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">&amp;&amp;</td>
<td>And</td>
<td>if($number == 5 &amp;&amp; $name == &#8216;Bob&#8217;)</td>
<td>Checking if a variable (number) is equal to five and a variable (name) is equal to &#8216;Bob&#8217;</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">||</td>
<td>Or</td>
<td>if($number == 5 || $number == 2)</td>
<td>Checking if a variable is either 5 or 2</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">!</td>
<td>Not</td>
<td>(See Not Equal)</td>
<td></td>
</tr>
<tr>
<td bgcolor="#EAEAEA">++</td>
<td>Increment</td>
<td>$number ++;</td>
<td>Adds 1 to the previous number, if $number was 5 it is now 6</td>
</tr>
<tr>
<td bgcolor="#EAEAEA">&#8211;</td>
<td>Decrement</td>
<td>$number &#8211;;</td>
<td>Subtracts 1 from the previous number, if $number was 5 it is now 4</td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=60&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/05/28/basics-of-php-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; If, ElseIf &amp; Else Statements</title>
		<link>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-if-elseif-else-statements/</link>
		<comments>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-if-elseif-else-statements/#comments</comments>
		<pubDate>Wed, 26 May 2010 20:37:56 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[conditional]]></category>
		<category><![CDATA[conditional statements]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php else]]></category>
		<category><![CDATA[php elseif]]></category>
		<category><![CDATA[php if]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>
		<category><![CDATA[statements]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=49</guid>
		<description><![CDATA[The whole point behind creating a site using PHP is to make it dynamic and display different content for different situations which is why PHP&#8217;s If, ElseIf and Else statements are so valuable. For a moment though we&#8217;re just going to focus on If and Else. Simply put when you write an &#8216;If&#8217; statement PHP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=49&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The whole point behind creating a site using PHP is to make it dynamic and display different content for different situations which is why PHP&#8217;s If, ElseIf and Else statements are so valuable. For a moment though we&#8217;re just going to focus on If and Else.</p>
<p>Simply put when you write an &#8216;If&#8217; statement PHP is checking to see if something is true and &#8216;Else&#8217; is looking to see if the previous &#8216;If&#8217; statement was false. Still following? Let&#8217;s use a greetings example. Say we have created a site and we want it to say either &#8220;Good morning&#8221; if the time is from midnight to 11:59 AM and &#8220;Good afternoon&#8221; from 12 PM up, we would use the &#8216;If&#8217; statement to check if the time was between 00:00 AM and 11:59 AM and if it was display the correct greeting, then we would use the &#8216;Else&#8217; statement if the &#8216;If&#8217; statement did not identify the time as being within it&#8217;s parameters.</p>
<p>But before we get into the &#8216;If&#8217; and &#8216;Else&#8217; statements there is a function which needs to be introduced. &#8216;date&#8217; is a function which can determine the current date and/or time, you don&#8217;t need to know too much about this at the moment other than the code below is storing the current hour (from 00 &#8211; 23) into the variable called $hour.</p>
<p><pre class="brush: php;">&lt;?php

//Store the current hour
$hour = date('H');

?&gt;</pre></p>
<p>So to give an example, the time here in London is currently 21:14 so the $hour variable would currently be set to &#8217;21&#8242;.</p>
<p>Now that we have the current hour stored we can more onto the &#8216;If&#8217; statement.</p>
<p><pre class="brush: php;">&lt;?php

//Store the current hour
$hour = date('H');

//Check if the hour is equal or greater than 00 and equal or less than 11
if($hour &gt;= 00 &amp;&amp; $hour &lt;= 11) {

//Display the morning greeting
echo 'Good morning';

}

?&gt;</pre></p>
<p>I know, I know there&#8217;s a lot to take in here so let&#8217;s tackle this from the top. Once &#8216;If&#8217; is declared the parameters are then placed inside the brackets, take a look at the first part of the parameter&#8230;</p>
<p><pre class="brush: php;">if($hour &gt;= 00</pre></p>
<p>&#8216;&gt;=&#8217; is an operator and it means greater than or equal, so PHP is looking for the hour (which in my case is &#8217;21&#8242;, currently) to be greater than or equal to &#8217;00&#8242;, which it is. Next we have (&amp;&amp;) this operator means &#8216;and&#8217;, here PHP is looking for the time to be greater than or equal to &#8217;00&#8242; and less than or equal to &#8217;11&#8242;, less than or equal to is (&lt;=) if you haven&#8217;t already worked that out.</p>
<p>Now using the (&amp;&amp;) sign isn&#8217;t mandatory, we could  have quite as easily just done</p>
<p><pre class="brush: php;">if($hour &lt;= 11)</pre></p>
<p>Which would have produced the same results, but then you wouldn&#8217;t know how valuable &#8216;And&#8217; was, would you!</p>
<p>Next we have the curly brackets ({) and (}), whatever is placed between these brackets is what PHP will execute if the &#8216;If&#8217;, &#8216;ElseIf&#8217; or &#8216;Else&#8217; statement runs.</p>
<p>Finally we have the echo function which displays &#8220;Good morning&#8221;.</p>
<p>Now, what if the time is later than 11:59, introducing &#8216;Else&#8217;.</p>
<p><pre class="brush: php;">&lt;?php

//Store the current hour
$hour = date('H');

//Check if the hour is equal or greater than 00 and equal or less than 11
if($hour &gt;= 00 &amp;&amp; $hour &lt;= 11) {

//Display the morning greeting
 echo 'Good morning';

}

//Check if the hour is greater than 11
else {

//Display the afternoon greeting
echo 'Good afternoon';

}

?&gt;</pre></p>
<p>&#8216;Else&#8217; is pretty straight forward and doesn&#8217;t require any parameters as it&#8217;s just checking to see if the previous &#8216;If&#8217; statement worked, and if not it runs &#8216;Else&#8217;.</p>
<p>Now there&#8217;s only one small problem, 9PM isn&#8217;t really the afternoon any more, so it&#8217;s time to introduce &#8216;ElseIf&#8217;, &#8216;ElseIf&#8217; is just like &#8216;If&#8217; except it runs after the &#8216;If&#8217; statement (like &#8216;Else&#8217; does, more on this later though).</p>
<p><pre class="brush: php;">&lt;?php

//Store the current hour
$hour = date('H');

//Check if the hour is equal or greater than 00 and equal or less than 11
if($hour &gt;= 00 &amp;&amp; $hour &lt;= 11) {

//Display the morning greeting
echo 'Good morning';

}

//Check if the hour is greater than 11 and less than 18
elseif($hour &gt;= 12 &amp;&amp; $hour &lt;= 18) {

//Display the afternoon greeting
echo 'Good afternoon';

}

//Check if the hour is greater than or equal to 19
else {

//Display the evening greeting
echo 'Good evening';

}

?&gt;</pre></p>
<p>Hopefully you understand what &#8216;ElseIf&#8217; is doing, if not just got back and take a look at &#8216;If&#8217;. If you&#8217;re going to use &#8216;If&#8217; then there&#8217;s no requirement to have an &#8216;ElseIf&#8217; or an &#8216;Else&#8217;, you can just let PHP display nothing if &#8216;If&#8217; does not return true, you can also use as many &#8216;ElseIf&#8217; statements as you like but you can only use a maximum of one &#8216;Else&#8217; statement.</p>
<p><strong>View this tutorial on YouTube @ <a href="http://www.youtube.com/watch?v=mp1-r3KEStQ">http://www.youtube.com/watch?v=mp1-r3KEStQ</a></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=49&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-if-elseif-else-statements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; Comments</title>
		<link>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-comments/</link>
		<comments>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-comments/#comments</comments>
		<pubDate>Wed, 26 May 2010 18:10:56 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php comments]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=41</guid>
		<description><![CDATA[PHP Applications can get very complicated, very fast. Part of being a good developer is keeping a clean shop. So bring on comments, comments are areas of text inside a PHP file that you can use to explain what an area of the code is doing, comments are ignored by the server so PHP won&#8217;t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=41&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>PHP Applications can get very complicated, very fast. Part of being a good developer is keeping a clean shop. So bring on comments, comments are areas of text inside a PHP file that you can use to explain what an area of the code is doing, comments are ignored by the server so PHP won&#8217;t do anything with them, they are there purely to explain to the developer what they are looking at.</p>
<p>There are a few type of comments you can use, the first is called the Single Line Comment.</p>
<p><pre class="brush: php;">&lt;?php

//Set my name
$my_name = 'Joe Smith';

//Display my name
echo $my_name;

?&gt;</pre></p>
<p>Single Line Comments start with two forward slashes (//), this tells PHP to ignore what comes after it. This comment can only exist on one line, if you want to write a comment over multiple lines you need to use a multiple line comment.</p>
<p><pre class="brush: php;">&lt;?php

/* This is a multi-line comment.
It keeps working on the next line,
And the next. */

?&gt;</pre></p>
<p>Multiple Line Comments start with a (/*) and end with a (*/), anything that is placed in between will be automatically commented out by PHP.</p>
<p><strong>View this tutorial on YouTube @ <a href="http://www.youtube.com/watch?v=DOGXQUz5bEw">http://www.youtube.com/watch?v=DOGXQUz5bEw</a></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=41&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; Variables</title>
		<link>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-variables/</link>
		<comments>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-variables/#comments</comments>
		<pubDate>Wed, 26 May 2010 15:51:12 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>
		<category><![CDATA[var]]></category>
		<category><![CDATA[variables]]></category>
		<category><![CDATA[vars]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=25</guid>
		<description><![CDATA[Variables are a common sight inside a PHP file, they are used to store pieces of information for multiple use. For example if I am writing a program that displays my house address multiple times I probably wont want to write it out, in full, over and over again. So instead I can write it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=25&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Variables are a common sight inside a PHP file, they are used to store pieces of information for multiple use. For example if I am writing a program that displays my house address multiple times I probably wont want to write it out, in full, over and over again. So instead I can write it out in full once and then call on it easily in the future. Welcome to variables.</p>
<p><pre class="brush: php;">&lt;?php

$my_address = '13 Lambeth Close, Bexley, London, UK';

?&gt;</pre></p>
<p>Here is an example of a variable, a variables is made up of three parts. Firstly there is the dollar sign ($), this is used at the beginning of a variable to let PHP know what you are doing. Next is the variable name, this appears directly after the dollar sign (no spaces in between), each variable needs it&#8217;s own unique name so I&#8217;ve named mine &#8220;my_address&#8221;. Finally we need to add the contents of the variable (in other words what the variable is supposed to remember), this appears after the equals sign (=) in quotes.</p>
<p>Now that I have stored my variable it&#8217;s time to use it.</p>
<p><pre class="brush: php;">&lt;?php

$my_address = '13 Lambeth Close, Bexley, London, UK';

echo $my_address;

?&gt;</pre></p>
<p>Here I&#8217;m using the &#8216;echo&#8217; function that we discussed earlier (notice how I don&#8217;t put the variable in quotes, only strings need to be placed in these) to display the contents of the variable, and that&#8217;s it &#8211; now you know how to work with variables.</p>
<p><strong>View this tutorial on YouTube @ </strong><a href="http://www.youtube.com/watch?v=TLdu4Ho4NKI"><strong>http://www.youtube.com/watch?v=TLdu4Ho4NKI</strong></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=25&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of PHP &#8211; Hello World</title>
		<link>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-hello-world/</link>
		<comments>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-hello-world/#comments</comments>
		<pubDate>Wed, 26 May 2010 13:45:00 +0000</pubDate>
		<dc:creator>awesomePHP</dc:creator>
				<category><![CDATA[Basics of PHP]]></category>
		<category><![CDATA[basic php]]></category>
		<category><![CDATA[basics of php]]></category>
		<category><![CDATA[learn php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[php tutorials]]></category>

		<guid isPermaLink="false">http://awesomephp.wordpress.com/?p=8</guid>
		<description><![CDATA[Functions are what PHP is all about and so they are a great starting point for a new PHP developer. PHP has around 700 pre-made, ready-to-use functions from the simplest which output text to the browser (what we&#8217;ll be starting with) to the more complex that manage the server. All of PHP&#8217;s functions can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=8&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Functions are what PHP is all about and so they are a great starting point for a new PHP developer. PHP has around 700 pre-made, ready-to-use functions from the simplest which output text to the browser (what we&#8217;ll be starting with) to the more complex that manage the server. All of PHP&#8217;s functions can be found at <a href="http://www.php.net">http://www.php.net/</a> (although personally I just Google the function to find it, even something as simple as &#8220;number of letters in a string, php&#8221; will turn up the correct function and saves a lot of time!).</p>
<p>The function used to output something to the browser is called &#8220;echo&#8221; (<a href="http://php.net/manual/en/function.echo.php">http://php.net/manual/en/function.echo.php</a>) and is the most frequently used function by PHP developers, it&#8217;s also really easy to use. The first thing we need to do is create the PHP tags shown below.</p>
<p><pre class="brush: php;">&lt;?php

?&gt;</pre></p>
<p>PHP tags are used to tell the server that whatever is shown in between the tags needs to be read as PHP (otherwise it will get read as HTML). Now that the tags are in place we can write the function.</p>
<p><pre class="brush: php;">&lt;?php

echo 'Hello World!';

?&gt;</pre></p>
<p>Functions are usually split up into two parts, first we have to tell PHP which function we want to use (in this case &#8216;echo&#8217;) and then we have to set the function&#8217;s parameters. In this case we have set the parameters inside the quotes (&#8216;) however you will find that most of PHP&#8217;s functions require brackets, but we&#8217;ll get to that later.</p>
<p>Parameters make the function do specific things and they are unique to each function, in the case of &#8216;echo&#8217; the function only has one parameter, this parameter just needs to be set to whatever you want to output to the browser. In this case we want the browser to display the text &#8220;Hello World!&#8221; so we have placed that inside the quotes.</p>
<p>Finally at the end of the function we have a semicolon &#8216;;&#8217; this let&#8217;s PHP know that the statement (in this case function) has ended, don&#8217;t forget this or you will get an error.</p>
<p>Once you have finished writing your first PHP application you need to save the file (I chose hello_world.php) and then upload it to your server, open the file and you should see the text &#8220;Hello World!&#8221;. If you do then congrats, you&#8217;re on your way to becoming a PHP guru! If not then take another look at everything and if you&#8217;re still having trouble put a comment here and I&#8217;ll try to help out.</p>
<p><strong>View this tutorial on YouTube @ <a href="http://www.youtube.com/watch?v=m9BcPtEvuD8">http://www.youtube.com/watch?v=m9BcPtEvuD8</a></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/awesomephp.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/awesomephp.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/awesomephp.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/awesomephp.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/awesomephp.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/awesomephp.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/awesomephp.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/awesomephp.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/awesomephp.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/awesomephp.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/awesomephp.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/awesomephp.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/awesomephp.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/awesomephp.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=awesomephp.wordpress.com&amp;blog=13876342&amp;post=8&amp;subd=awesomephp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://awesomephp.wordpress.com/2010/05/26/basics-of-php-hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/be5f5ba5a5ba06cf46b1b39ff9dcfabc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">awesomephp</media:title>
		</media:content>
	</item>
	</channel>
</rss>
