<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>PHP Tutorials</title>
	<atom:link href="http://programmingtutorials.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://programmingtutorials.wordpress.com</link>
	<description>Learn PHP here..</description>
	<lastBuildDate>Mon, 10 Mar 2008 02:19:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='programmingtutorials.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/f68af28bc307b849d16a8627b3837d6e?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>PHP Tutorials</title>
		<link>http://programmingtutorials.wordpress.com</link>
	</image>
			<item>
		<title>I transferred to the new site.. myprogrammingtutorials.com</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/05/i-transferred-to-the-new-site-myprogrammingtutorialscom/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/05/i-transferred-to-the-new-site-myprogrammingtutorialscom/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 22:53:14 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[TRANSFERRED TO NEW SITE]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/2008/03/05/i-transferred-to-the-new-site-myprogrammingtutorialscom/</guid>
		<description><![CDATA[Please visit my new site instead of this..thx guys!!
Visit my new site &#8212;&#62;&#62; http://myprogrammingtutorials.com
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=16&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Please visit my new site instead of this..thx guys!!</p>
<p>Visit my new site &#8212;&gt;&gt; <font size="3"><b>http://myprogrammingtutorials.com</b></font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=16&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/05/i-transferred-to-the-new-site-myprogrammingtutorialscom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>Create tables and database in PHP/MySQL</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/04/create-tables-and-database-in-phpmysql/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/04/create-tables-and-database-in-phpmysql/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 04:11:46 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP/MySQL]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=14</guid>
		<description><![CDATA[Create tables and database in PHP/MySQL
A database is composed of one or more tables.

Create a database
We use the CREATE DATABASE statement in MySQL to create a database.
 
Syntax:
CREATE DATABASE database_name

 
NOTE: We must use the mysql_query() function so that PHP will execute the given command like CREATE DATABASE database_name. This function is used to send [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=14&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal"><b>Create tables and database in PHP/MySQL</b><br />
A database is composed of one or more tables.<b><br />
</b></p>
<p class="MsoNormal"><b>Create a database</b><br />
We use the CREATE DATABASE statement in MySQL to create a database.</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal">Syntax:<br />
<font color="blue">CREATE DATABASE database_name<br />
</font></p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal">NOTE: We must use the mysql_query() function so that PHP will execute the given command like CREATE DATABASE database_name. This function is used to send a command or query to a MySQL connection.</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal">In this example, we will be making a database named newdatabase:</p>
<p><font color="blue"></font></p>
<p class="MsoNormal"><font color="blue">&lt;?php<br />
$connect = mysql_connect(“localhost”,”bryan”,”777”);<br />
if(!$connect)<br />
{<br />
die(“failed to connect: “ . mysql_error());<br />
}<br />
<!--[if !supportLineBreakNewLine]--><br />
$makedatabase = mysql_query(“CREATE DATABASE newdatabase”,$connect);</font></p>
<p class="MsoNormal"><font color="blue">if(!$makedatabase)<br />
{<br />
echo “Failed to create database: “ . mysql_error();<br />
}<br />
else<br />
{<br />
echo “Database created”;<br />
}<br />
<!--[if !supportLineBreakNewLine]--><br />
mysql_close($connect);<br />
?&gt;</font></p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal"><b>Creating a table in MySQL</b><br />
We need to use the CREATE TABLE statement when making a table in MySQL.</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal">Syntax:<br />
<font color="blue">CREATE TABLE mytable<br />
{<br />
column_name1 data_type,<br />
column_name2 data_type,<br />
…………..<br />
}</font></p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--><font color="blue"> <!--[endif]--></font></p>
<p class="MsoNormal">Example:<br />
This example will create an employee table and the 3 columns are emp_num, emp_name, and emp_age.</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p><font color="blue"></font></p>
<p class="MsoNormal"><font color="blue">&lt;?php<br />
$connect = mysql_connect(“localhost”,”bryan”,”777”);<br />
if (!$connect)<br />
{<br />
die(“Failed to connect: “ . mysql_error());<br />
}<br />
<!--[if !supportLineBreakNewLine]--><br />
$makedatabase = mysql_query(“CREATE DATABASE newdatabase”,$connect);</font></p>
<p class="MsoNormal"><font color="blue">if(!$makedatabase)<br />
{<br />
echo “Failed to create database: “ . mysql_error();<br />
}<br />
else<br />
{<br />
echo “Database created”;<br />
}<br />
<!--[if !supportLineBreakNewLine]--><br />
mysql_select_db(“newdatabase”, $connect);</font></p>
<p class="MsoNormal"><font color="blue">$create_table = “CREATE TABLE employee<br />
(<br />
emp_num int,<br />
emp_name varchar(50),<br />
emp_age int<br />
)”;</font></p>
<p class="MsoNormal"><font color="blue">mysql_query($create_table,$connect);<br />
mysql_close($connect);<br />
?&gt;</font></p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--><font color="blue"> <!--[endif]--></font></p>
<p class="MsoNormal">NOTE: Before creating a table, you must first make sure that you have selected a database by using the function mysql_select_db().</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal">Primary Keys</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal">Every table should have a primary key. Primary keys are used to uniquely identify the rows in a table. There should be no duplicates in the values of the primary key. They value of primary can’t contain a null.</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal">In the example below, we made the emp_id as the primary key. Primary key is often a number and used with AUTO_INCREMENT. AUTO_INCREMENT increases by 1 each time a new record is added. We should also use NOT NULL to make sure that the primary key will not have null values.</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p><font color="blue"></font></p>
<p class="MsoNormal"><font color="blue">$create_table = “CREATE TABLE employee<br />
(<br />
emp_num int NOT NULL AUTO_INCREMENT,<br />
PRIMARY KEY(emp_num),<br />
emp_name varchar(50),<br />
emp_age int<br />
)”;</font></p>
<p class="MsoNormal"><font color="blue">mysql_query($create_table,$connect);</font></p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--><font color="blue"> <!--[endif]--></font></p>
<p class="MsoNormal"><font color="blue">mysql_close($connect);</font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=14&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/04/create-tables-and-database-in-phpmysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>Connect PHP to a MySQL Database</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/04/connect-php-to-a-mysql-database/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/04/connect-php-to-a-mysql-database/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 02:38:08 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP/MySQL]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=13</guid>
		<description><![CDATA[Connect PHP to a MySQL Database
MySQL is the most common database used with PHP.
 Connecting PHP to a MySQL Database
You must first connect to a database so you can access and work with data in a database.
&#160;
Syntax (Connect PHP to MySQL):
mysql_connect(servername, username, password);
Example (Connect PHP to MySQL):
In this example, I stored the connection in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=13&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>Connect PHP to a MySQL Database</b><br />
MySQL is the most common database used with PHP.</p>
<p class="MsoNormal"> Connecting PHP to a MySQL Database<br />
You must first connect to a database so you can access and work with data in a database.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><b>Syntax (Connect PHP to MySQL):</b><br />
mysql_connect(servername, username, password);</p>
<p class="MsoNormal"><b>Example (Connect PHP to MySQL):</b><br />
In this example, I stored the connection in the $connect variable so we will be using it later and if it failed to connect then the die statement will be executed.<br />
<font color="blue"><br />
&lt;?php<br />
$connect = mysql_connect(“localhost”,”bryan”,”777”);<br />
if(!$connect)<br />
{<br />
die(“Failed to connect: “ . mysql_error());<br />
}<br />
?&gt;<br />
</font><br />
<b>Closing a connection</b><br />
As soon as the script ends, the connection will be automatically closed but you can close it by using the mysql_close() function.</p>
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--></p>
<p class="MsoNormal">Here is an example:<br />
<font color="blue"><br />
&lt;?php<br />
$connect = mysql_connect(“localhost”,”bryan”,”777”);<br />
if(!$connect)<br />
{<br />
die(“Failed to connect: “ . mysql_error());<br />
}<br />
mysql_close($connect);<br />
?&gt;<br />
</font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=13&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/04/connect-php-to-a-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP $_COOKIE</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/04/php-_cookie/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/04/php-_cookie/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 00:59:15 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=12</guid>
		<description><![CDATA[PHP $_COOKIE
This variable is often used to identify a user. This is stored on the user’s computer so that every user will be identified if who are they. You can create and get the value of a cookie.

setcookie() function
This function is used to create a cookie. This should appear before the &#60;html&#62; tag.

Syntax:
setcookie (name, value, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=12&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>PHP $_COOKIE</b><br />
This variable is often used to identify a user. This is stored on the user’s computer so that every user will be identified if who are they. You can create and get the value of a cookie.<br />
<b><br />
setcookie() function</b><br />
This function is used to create a cookie. This should appear before the &lt;html&gt; tag.<br />
<b><br />
Syntax:</b><br />
<font color="blue">setcookie (name, value, expire, path, domain);<br />
</font><br />
<b><br />
Example (create a cookie):</b><br />
<font color="blue">&lt;?php<br />
setcookie(“firstname”, “Bryan”, time()+7200);<br />
?&gt;<span>    </span>//this should be written before the &lt;html&gt; tag<br />
</font></p>
<p class="MsoNormal"><b>Here is an example on how to retrieve the value of a cookie:</b><br />
<font color="blue">&lt;?php<br />
echo $_COOKIE[“firstname”];<br />
?&gt;<b></b><br />
</font><br />
<b>isset() function</b><br />
This can be used to check if a cookie has been set.</p>
<p><b>Example (using isset() function):</b><br />
<font color="blue">&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
if (isset($_COOKIE[“firstname”]))<br />
{<br />
<span></span>echo “You are “ . $_COOKIE[“firstname”];<br />
}<br />
else<br />
{<br />
<span></span>echo “Please input your firstname”;<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</font><br />
<b><br />
You can view all cookies by this:</b><br />
<font color="blue">&lt;?php<br />
print_r($_COOKIE);<br />
?&gt;</font></p>
<p class="MsoNormal"><font color="blue"> </font></p>
<p class="MsoNormal"><b>You can delete a cookie by setting its expiration date in the past like this:</b><br />
<font color="blue">&lt;?php<br />
setcookie(“firstname”,””,time()-7200);<br />
?&gt;</font></p>
<p class="MsoNormal"><font color="blue"> </font></p>
<p class="MsoNormal"><font color="blue"> </font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=12&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/04/php-_cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP $_REQUEST</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/04/php-_request/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/04/php-_request/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 00:52:18 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=11</guid>
		<description><![CDATA[PHP $_REQUEST
This variable contains the content of both $_GET, $_COOKIE, and $_POST.
This can get the values passed from the form with both the GET and POST methods.
Here are 2 examples:

&#60;form action=”myphp.php” method=”POST”&#62;
Firstname: &#60;input type=”text” name=”firstname” /&#62;
Lastname: &#60;input type=”text” name=”lastname” /&#62;
&#60;input type=”submit” /&#62;
&#60;/form&#62;
&#60;?php
echo “Firstname: “ $_REQUEST[“firstname”]; . &#60;br /&#62;;
echo “Lastname: “ $_REQUEST[“lastname”];
?&#62;

OR

&#60;form action=”myphp.php” method=”GET”&#62;
Firstname: &#60;input type=”text” [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=11&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal"><b>PHP $_REQUEST</b><br />
This variable contains the content of both $_GET, $_COOKIE, and $_POST.</p>
<p>This can get the values passed from the form with both the GET and POST methods.</p>
<p>Here are 2 examples:<br />
<font color="blue"></font></p>
<p class="MsoNormal"><font color="blue">&lt;form action=”myphp.php” method=”POST”&gt;<br />
Firstname: &lt;input type=”text” name=”firstname” /&gt;<br />
Lastname: &lt;input type=”text” name=”lastname” /&gt;<br />
&lt;input type=”submit” /&gt;<br />
&lt;/form&gt;</font></p>
<p><font color="blue">&lt;?php<br />
echo “Firstname: “ $_REQUEST[“firstname”]; . &lt;br /&gt;;<br />
echo “Lastname: “ $_REQUEST[“lastname”];<br />
?&gt;<br />
</font><br />
OR<br />
<font color="blue"><br />
&lt;form action=”myphp.php” method=”GET”&gt;<br />
Firstname: &lt;input type=”text” name=”firstname” /&gt;<br />
Lastname: &lt;input type=”text” name=”lastname” /&gt;<br />
&lt;input type=”submit” /&gt;<br />
&lt;/form&gt;</font></p>
<p><font color="blue">&lt;?php<br />
echo “Firstname: “ . $_REQUEST[“firstname”] . “&lt;br /&gt;”;<br />
echo “Lastname: “ . $_REQUEST[“lastname”] ;<br />
?&gt;</font></p>
<p class="MsoNormal"><font color="blue"> </font></p>
<p class="MsoNormal"><font color="blue"> </font></p>
<p class="MsoNormal">&nbsp;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=11&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/04/php-_request/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP $_POST</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/04/php-_post/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/04/php-_post/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 00:41:02 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=10</guid>
		<description><![CDATA[PHP $_POST
This variable is used to get a value from a form. Unlike $_GET, $_POST is invisible to users and will not display the user’s input in the URL and has no limit.
Example:
&#60;form action=”myphp.php” method=”POST”&#62;
Firstname: &#60;input type=”text” name=”firstname” /&#62;
Lastname: &#60;input type=”text” name=”lastname” /&#62;
&#60;input type=”submit” /&#62;
&#60;/form&#62;

When the user clicks the submit button, it will not display [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=10&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>PHP $_POST</b><br />
This variable is used to get a value from a form. Unlike $_GET, $_POST is invisible to users and will not display the user’s input in the URL and has no limit.</p>
<p><b>Example:<br />
</b><font color="blue">&lt;form action=”myphp.php” method=”POST”&gt;<br />
Firstname: &lt;input type=”text” name=”firstname” /&gt;<br />
Lastname: &lt;input type=”text” name=”lastname” /&gt;<br />
&lt;input type=”submit” /&gt;<br />
&lt;/form&gt;<br />
</font><br />
When the user clicks the submit button, it will not display the user’s input in the URL like the $_GET. It will simply look like this:<br />
<font color="blue"><br />
http://myphp.com/myphp.php<br />
</font></p>
<p class="MsoNormal"> Now, we can use the two values passed from the form by using the $_POST variable:<br />
<font color="blue"></font></p>
<p class="MsoNormal"><font color="blue">&lt;?php<br />
echo “Firstname: “ $_POST[“firstname”]; . &lt;br /&gt;;<br />
echo “Lastname: “ $_POST[“lastname”];<br />
?&gt;<br />
</font></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=10&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/04/php-_post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP $_GET</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/04/php-_get/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/04/php-_get/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 00:28:59 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=8</guid>
		<description><![CDATA[PHP $_GET
This variable is used to get a value from a form. Below is an example:

&#60;form action=”myphp.php” method=”GET”&#62;
Firstname: &#60;input type=”text” name=”firstname” /&#62;
Lastname: &#60;input type=”text” name=”lastname” /&#62;
&#60;input type=”submit” /&#62;
&#60;/form&#62;

When the user clicks the submit button, it will then display a different URL depending on the user’s input. I’ll use Bryan for first name and King for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=8&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal"><b>PHP $_GET</b><br />
This variable is used to get a value from a form. Below is an example:<br />
<font color="blue"><br />
&lt;form action=”myphp.php” method=”GET”&gt;<br />
Firstname: &lt;input type=”text” name=”firstname” /&gt;<br />
Lastname: &lt;input type=”text” name=”lastname” /&gt;<br />
&lt;input type=”submit” /&gt;<br />
&lt;/form&gt;<br />
</font><br />
When the user clicks the submit button, it will then display a different URL depending on the user’s input. I’ll use Bryan for first name and King for last name so the URL will look like this:</p>
<p>Http://www.myphp.com/myphp.php?firstname=Bryan&amp;lastname=King</p>
<p>Now, we can use the two values passed from the form by using the $_GET variable:<br />
<font color="blue"></font></p>
<p class="MsoNormal"><font color="blue">&lt;?php<br />
echo “Firstname: “ . $_GET[“firstname”] . “&lt;br /&gt;”;<br />
echo “Lastname: “ . $_GET[“lastname”] ;<br />
?&gt;<br />
</font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=8&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/04/php-_get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Functions</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/02/php-functions/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/02/php-functions/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 13:30:44 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=7</guid>
		<description><![CDATA[PHP Functions
In this tutorial, i will teach you how to make functions in PHP and how to use it. A function is a block of code that we can call and use whenever we want.
Below is an example of a function that will display the text &#8220;learn PHP&#8221; when called:

&#60;html&#62;
&#60;body&#62;
&#60;?php
function displayMessage()
{
echo &#8220;learn PHP.&#8221;;
}
displayMessage();
?&#62;
&#60;/body&#62;
&#60;/html&#62;

Another example where [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=7&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>PHP Functions</b></p>
<p>In this tutorial, i will teach you how to make functions in PHP and how to use it. A function is a block of code that we can call and use whenever we want.</p>
<p>Below is an example of a function that will display the text &#8220;learn PHP&#8221; when called:<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
function displayMessage()<br />
{<br />
echo &#8220;learn PHP.&#8221;;<br />
}<br />
displayMessage();<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font><br />
Another example where we will be using the function we made:<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
function displayMessage()<br />
{<br />
echo &#8220;learn PHP.&#8221;;<br />
}</font></p>
<p><font color="blue">echo &#8220;I want to &#8220;;<br />
displayMessage();<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font><br />
Output is:<br />
I want to lean PHP</p>
<p><b>PHP Functions &#8211; Adding Parameters</b></p>
<p>We can also add parameter to our functions so it can have different outputs depending on the user input. A parameter is just like a variable. We should place the parameters inside the parentheses like this displayMessage($myMessage).</p>
<p>Here is an example where it will display our inputted message:<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
function displayMessage($myMessage)<br />
{<br />
echo $myMessage . &#8220;. &lt;br /&gt;&#8221;;<br />
}<br />
echo &#8220;My message is &#8220;;<br />
$displayMessage(&#8220;Welcome to my blog, if you have any questions just leave a comment&#8221;);<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font><br />
Output is:<br />
My message is Welcome to my blog, if you have any questions just leave a comment.</p>
<p>Here is another example where we will be having 2 parameters:<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
function displayMessage($myMessage, $punctuation)<br />
{<br />
echo $myMessage . $punctuation . &#8220;&lt;br /&gt;&#8221;;<br />
}<br />
echo &#8220;My message is &#8220;;<br />
displayMessage(&#8220;Please register here&#8221;,&#8221;.&#8221;);<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font><br />
Output is:<br />
My message is Please register here.</p>
<p><b>PHP Functions &#8211; Return Values</b><br />
Functions can also return values.</p>
<p>Here is an example:<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
function fullName($fname, $lname)<br />
{<br />
$fullname = $fname . &#8221; &#8221; . $lname;<br />
return $fullname;<br />
}</font></p>
<p><font color="blue">echo&#8221;My full name is &#8221; . fullName(&#8220;Bryan Joseph&#8221;,&#8221;King&#8221;);<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font><br />
Output is:<br />
My full name is Bryan Joseph King</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=7&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/02/php-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Looping</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/02/php-looping/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/02/php-looping/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 08:58:24 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=6</guid>
		<description><![CDATA[This is used to execute same codes at specified number of times.
There are four  PHP looping statements:

while &#8211; will continue looping through the code as long as the condition is true
do&#8230;while &#8211; loops through the code then if the condition is true then it continues otherwise it will end the loop
for &#8211; loops through [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=6&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is used to execute same codes at specified number of times.</p>
<p><b>There are four  PHP looping statements:</b></p>
<ul>
<li>while &#8211; will continue looping through the code as long as the condition is true</li>
<li>do&#8230;while &#8211; loops through the code then if the condition is true then it continues otherwise it will end the loop</li>
<li>for &#8211; loops through the code while the condition is true</li>
<li>foreach &#8211; loops through the code for each element in an array</li>
</ul>
<p><b>The while statement</b><br />
This will continue to execute the code as long as the condition is true. Below is the syntax:<br />
<font color="blue"><br />
while (condition)<br />
code to be executed;<br />
</font><br />
Below is an example:</p>
<p>It will continue to execute the code as long as the variable x is less than 3. Variable x will increase by 1 every time the code is executed.<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$x = 0;<br />
while($x&lt;3)<br />
{<br />
echo &#8220;Display me 3 times. &lt;br /&gt;&#8221;;<br />
$x++;<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font><br />
<b> The do&#8230;while statement</b></p>
<p>Loops through the code then if the condition is true then it continues otherwise it will end the loop.<br />
Below is the syntax:<br />
<font color="blue"><br />
do<br />
{<br />
code to be executed;<br />
}<br />
while (condition);<br />
</font><br />
Below is an example:</p>
<p>It will continue to execute the code as long as the variable x is less than 3. Variable x will increase by 1 every time the code is executed.<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$x=0;<br />
while ($x&lt;3)<br />
{<br />
echo &#8220;display me 3 times. &lt;br /&gt;&#8221;;<br />
$x++;<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font><br />
<b> The for statement</b><br />
Loops through the code while the condition is true. Below is the syntax:<br />
<font color="blue"><br />
for (initialization; condition; increment)<br />
{<br />
code to be executed;<br />
}<br />
</font><br />
Below is an example:<br />
It will display the text &#8220;Display me 3 times.&#8221; 3 times.<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
for($x=0;$x&lt;3;$x++)<br />
{<br />
echo &#8220;Display me 3 times. &lt;br /&gt;&#8221;;<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font><br />
<b> The foreach statement</b><br />
This is used to loop through arrays. For every loop, the value of the current array is assigned to $value so on the next loop, you&#8217;ll be looking at the next element. Below is the syntax:<br />
<font color="blue"><br />
foreach (array as value)<br />
{<br />
code to be executed;<br />
}<br />
</font><br />
Below is an example:<br />
<font color="blue"><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$myarray = array(&#8220;Learn&#8221;, &#8220;PHP&#8221;,&#8221;Now&#8221;);</font></p>
<p><font color="blue">for each($myarray as $value)<br />
{<br />
echo $value . &#8220;&lt;br /&gt;&#8221;;<br />
}</font></p>
<p><font color="blue">?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=6&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/02/php-looping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP String</title>
		<link>http://programmingtutorials.wordpress.com/2008/03/02/php-string/</link>
		<comments>http://programmingtutorials.wordpress.com/2008/03/02/php-string/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 07:40:52 +0000</pubDate>
		<dc:creator>fenix1987</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programmingtutorials.wordpress.com/?p=5</guid>
		<description><![CDATA[PHP Strings
A String is used to store and manipulate a piece of text. This data type is used when we want to store character strings. In this tutorial, i am going to discuss some common functions and operators used to manipulate strings in PHP. Below is an example:

&#60;?php
$txt = &#8220;Welcome.&#8221;;
echo $txt;
?&#62;

Output:

Welcome.

The Concatenation Operator
There is only [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=5&subd=programmingtutorials&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>PHP Strings</b><br />
A String is used to store and manipulate a piece of text. This data type is used when we want to store character strings. In this tutorial, i am going to discuss some common functions and operators used to manipulate strings in PHP. Below is an example:<br />
<font color="blue"><br />
&lt;?php<br />
$txt = &#8220;Welcome.&#8221;;<br />
echo $txt;<br />
?&gt;<br />
</font><br />
Output:<br />
<font color="blue"><br />
Welcome.<br />
</font></p>
<p><b>The Concatenation Operator</b><br />
There is only one string operator in PHP and this is the dot (.) operator and is used to combine to strings together. Below is an example:<br />
<font color="blue"><br />
&lt;?php<br />
$firsttext = &#8220;Learn&#8221;;<br />
$secondtext = &#8220;PHP&#8221;;<br />
echo $firsttext . &#8221; &#8221; . $secondtext;<br />
?&gt;<br />
</font><br />
Output:<br />
<font color="blue"><br />
Learn PHP<br />
</font></p>
<p><b>The strlen() function</b><br />
This is used to get the length of the string. Below is an example:<br />
<font color="blue"><br />
&lt;?php<br />
echo strlen(&#8220;Learn PHP&#8221;);<br />
?&gt;<br />
</font><br />
<font color="blue"><br />
Output:<br />
9<br />
</font></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/programmingtutorials.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/programmingtutorials.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/programmingtutorials.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/programmingtutorials.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/programmingtutorials.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/programmingtutorials.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/programmingtutorials.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/programmingtutorials.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/programmingtutorials.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/programmingtutorials.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/programmingtutorials.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/programmingtutorials.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=programmingtutorials.wordpress.com&blog=3034476&post=5&subd=programmingtutorials&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://programmingtutorials.wordpress.com/2008/03/02/php-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2af89fc13c5180720a4012300a20054?s=96&#38;d=identicon" medium="image">
			<media:title type="html">fenix1987</media:title>
		</media:content>
	</item>
	</channel>
</rss>