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

<channel>
	<title>PHP Programming Tutorials</title>
	<atom:link href="http://php-programming-tutorial.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://php-programming-tutorial.com</link>
	<description></description>
	<lastBuildDate>Tue, 02 Feb 2010 05:27:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create a New MySQL Database with PHP</title>
		<link>http://php-programming-tutorial.com/create-new-mysql-database-with-php/</link>
		<comments>http://php-programming-tutorial.com/create-new-mysql-database-with-php/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 04:00:36 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Beginner Tutorials]]></category>
		<category><![CDATA[PHP & MySQL Databases]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[query]]></category>

		<guid isPermaLink="false">http://php-programming-tutorial.com/?p=434</guid>
		<description><![CDATA[In our last article we discussed creating a MySQL database using phpMyAdmin, but what if we want to do it using PHP alone? We can do that. This tutorial will show how.
We will use four PHP functions:

mysql_connect. This opens a connection to the MySQL server.
mysql_error. If there is a problem, this gives us the error [...]]]></description>
			<content:encoded><![CDATA[<p>In our <a href="/create-mysql-database-with-phpmyadmin/">last article</a> we discussed creating a MySQL database using phpMyAdmin, but what if we want to do it using PHP alone? We can do that. This tutorial will show how.</p>
<p>We will use four PHP functions:</p>
<ol>
<li><span style="color: #008000;">mysql_connect</span>. This opens a connection to the MySQL server.</li>
<li><span style="color: #008000;">mysql_error</span>. If there is a problem, this gives us the error message.</li>
<li><span style="color: #008000;">mysq_query</span>. This sends (queries) MySQL information to the server.</li>
<li><span style="color: #008000;">mysql_close</span>. This closes your connection to the server.</li>
</ol>
<p>In this example, we will create a database called &#8220;movies&#8221;. We will assume the MySQL server is on the localhost which it is if you are running WampServer 2 as recommended in our tutorials.</p>
<p>The following code will create our database. Please read the comments to understand what is happening.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// First we will connect to our server.</span>
<span style="color: #666666; font-style: italic;">// Indicate the server address, username, and password.</span>
<span style="color: #666666; font-style: italic;">// If you have followed our tutorials since the beginning, your username is root.</span>
&nbsp;
<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;root&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;YOUR-PASSWORD-HERE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Now we will check to see if our $link variable shows we connected.</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// If it did not connect...</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sorry, I encountered this error: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">// The die function ends the script and uses the mysql_error to show us why we could not connect.</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// If we've made it this far, then our connection was successful.</span>
<span style="color: #666666; font-style: italic;">// So now we will create our database using the SQL &quot;create database&quot; command.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Using the $link connection, send our request to the server to create our movies database.</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CREATE DATABASE movies&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// If successful, tell us it worked.</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Database has been created.&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #666666; font-style: italic;">// But if it doesn't work, tell us why...</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Could not create database: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Now that we are finished with the connection, we will close it.</span>
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>And there it is. If successful, you will now have an empty database called &#8220;movies&#8221;. In our next tutorial, we will learn how to create tables in the database.</p>
]]></content:encoded>
			<wfw:commentRss>http://php-programming-tutorial.com/create-new-mysql-database-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a New MySQL Database with phpMyAdmin</title>
		<link>http://php-programming-tutorial.com/create-mysql-database-with-phpmyadmin/</link>
		<comments>http://php-programming-tutorial.com/create-mysql-database-with-phpmyadmin/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 00:38:09 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Beginner Tutorials]]></category>
		<category><![CDATA[PHP & MySQL Databases]]></category>
		<category><![CDATA[collation]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://php-programming-tutorial.com/?p=409</guid>
		<description><![CDATA[There are a few good ways to create a MySQL database. One of the easiest (and most visual) methods is to use phpMyAdmin. If you&#8217;ve followed our tutorials since the beginning, then you already have phpMyAdmin installed and ready to use.
Like usual in our tutorials, the first step is to make sure your local server [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few good ways to create a MySQL database. One of the easiest (and most visual) methods is to use phpMyAdmin. If you&#8217;ve followed our tutorials since the beginning, then you already have <a href="/installing-apache-php-and-mysql-tutorial/">phpMyAdmin installed</a> and ready to use.</p>
<p>Like usual in our tutorials, the first step is to make sure your local server is running, so make sure WAMP Server is online. Click on the WAMP icon in your Windows taskbar and choose phpMyAdmin. This will open your Web browser and take you to <span style="color: #008000;">http://localhost/phpmyadmin/</span>.</p>
<div class="wp-caption alignnone" style="width: 205px"><img class=" " title="Wamp server phpMyAdmin" src="http://php-programming-tutorial.com/wp-content/uploads/2009/11/wampserver-phpmyadmin.png" alt="wampserver-phpmyadmin" width="195" height="247" /><p class="wp-caption-text">WAMP Server Menu</p></div>
<p>The phpMyAdmin index page will load. It shows you a list of databases in the left column. It also gives you information about your MySQL server, your Web server, and phpMyAdmin itself.</p>
<p>Creating a new MySQL database with this tool is very easy. Near the middle of the screen, you&#8217;ll see the option to create a new database. Type in the database name &#8220;movies&#8221;. Your screen should look like this:</p>
<div id="attachment_415" class="wp-caption alignnone" style="width: 500px"><img class="size-full wp-image-415 " title="Create Movies Database Image" src="http://php-programming-tutorial.com/wp-content/uploads/2009/11/create-movies-database.png" alt="Create Movies Database Image" width="490" height="159" /><p class="wp-caption-text">Create Movies Database</p></div>
<p>The next thing to do is click <strong><span style="color: #008000;">Create</span></strong>. And then&#8230; congrats! You just created your database. It will show in the left column as &#8220;movies (0)&#8221;. The zero represents the current number of tables, which is none for now.</p>
<p>You might be curious what the &#8220;collation&#8221; stuff is all about. In short, a collation is a set of rules for comparing characters in a character set. For now, just set it to what you see in the image above, which is <span style="color: #008000;">utf8_general_ci</span>. Utf8 is one of the most common to use. If you&#8217;d like to learn more about collation, please visit <a href="http://dev.mysql.com/doc/refman/5.1/en/charset-general.html">MySQL&#8217;s official article</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://php-programming-tutorial.com/create-mysql-database-with-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &amp; MySQL Database Tutorial: Introduction</title>
		<link>http://php-programming-tutorial.com/php-mysql-tutorial-introduction/</link>
		<comments>http://php-programming-tutorial.com/php-mysql-tutorial-introduction/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 03:26:49 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Beginner Tutorials]]></category>
		<category><![CDATA[PHP & MySQL Databases]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://php-programming-tutorial.com/?p=393</guid>
		<description><![CDATA[Introduction
We use databases to store information and the most popular database used with PHP is MySQL. It&#8217;s also free, which is very convenient for us! If you&#8217;d like to build a site like Facebook, or store your customer&#8217;s order history, or keep an inventory of car parts, then you will need to use a database.
What [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong><br />
We use databases to store information and the most popular database used with PHP is MySQL. It&#8217;s also free, which is very convenient for us! If you&#8217;d like to build a site like Facebook, or store your customer&#8217;s order history, or keep an inventory of car parts, then you will need to use a database.</p>
<p><strong>What is MySQL?</strong><br />
MySQL is an open-source relational database system. It is very powerful and chances are that you&#8217;ve been to many web sites that were using a MySQL database to show information to you. In fact, MySQL stores all the information on this blog.</p>
<p>Databases consist of tables, which consists of columns and rows of information. Here&#8217;s an example of a table:</p>
<p><strong>Table Name:</strong> car_parts_inventory</p>
<table border="1" width="100%" bordercolor="#000000">
<tbody>
<tr>
<td><strong><span style="text-decoration: underline;">Row #</span></strong></td>
<td><strong><span style="text-decoration: underline;">Part Name</span></strong></td>
<td><strong><span style="text-decoration: underline;">Part ID</span></strong></td>
</tr>
<tr>
<td>1</td>
<td>Radio</td>
<td>F5JG7</td>
</tr>
<tr>
<td>2</td>
<td>Muffler</td>
<td>GG446</td>
</tr>
</tbody>
</table>
<p>So there&#8217;s a very small table that stores information about car parts and their associated ID number. Some large databases may contain hundreds of thousands of rows.</p>
<p>I mentioned earlier that MySQL is a relational database, which basically means that two or more tables can share the same attribute. Let&#8217;s do a small example. In our database, we&#8217;ll store movie information and use a relation to organize which actors are in the movie.</p>
<p>First we have the table that stores our actors:</p>
<p><strong>Table Name:</strong> actors</p>
<table border="1" width="100%" bordercolor="#000000">
<tbody>
<tr>
<td><strong><span style="text-decoration: underline;">actor_id</span></strong></td>
<td><strong><span style="text-decoration: underline;">actor_name</span></strong></td>
</tr>
<tr>
<td>1</td>
<td>Will Smith</td>
</tr>
<tr>
<td>2</td>
<td>Kevin Spacey</td>
</tr>
</tbody>
</table>
<p>And here&#8217;s the table that stores our movie information:</p>
<p><strong>Table Name:</strong> movies</p>
<table border="1" width="100%" bordercolor="#000000">
<tbody>
<tr>
<td><strong><span style="text-decoration: underline;">movie_id</span></strong></td>
<td><strong><span style="text-decoration: underline;">movie_name</span></strong></td>
<td><strong><span style="text-decoration: underline;">movie_star_actor</span></strong></td>
</tr>
<tr>
<td>1</td>
<td>Independence Day</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>The Pursuit of Happyness</td>
<td>1</td>
</tr>
<tr>
<td>3</td>
<td>Superman Returns</td>
<td>2</td>
</tr>
<tr>
<td>4</td>
<td>Hancock</td>
<td>1</td>
</tr>
<tr>
<td>5</td>
<td>Pay It Forward</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>In our movie table we have a unique movie_id for each movie, then the movie&#8217;s name, and then a number that represents the actor_id (from the first table) who stars in the movie.</p>
<p>In our next tutorial, we&#8217;ll look at how to create our new database in MySQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://php-programming-tutorial.com/php-mysql-tutorial-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 is out, new tutorial, and site restructure</title>
		<link>http://php-programming-tutorial.com/windows-7-is-out-new-tutorial-and-site-restructure/</link>
		<comments>http://php-programming-tutorial.com/windows-7-is-out-new-tutorial-and-site-restructure/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 21:27:18 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Beginner Tutorials]]></category>
		<category><![CDATA[The Site]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://php-programming-tutorial.com/?p=389</guid>
		<description><![CDATA[Windows 7 Released
Windows 7 was officially released yesterday and was the buzz on many blogs. I didn&#8217;t realize that people had operating system launch parties but hey, some people need any excuse to drink! Besides, that Windows cake looks tasty.
I&#8217;ll be upgrading soon, just because I like to have the latest version. I stuck with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Windows 7 Released</strong><br />
Windows 7 was officially released yesterday and was the buzz on many blogs. I didn&#8217;t realize that people had <a href="http://gizmodo.com/5388630/you-guys-had-some-wild-and-crazy-windows-7-launch-parties?skyline=true&#038;s=i">operating system launch parties</a> but hey, some people need any excuse to drink! Besides, that Windows cake looks tasty.</p>
<p>I&#8217;ll be upgrading soon, just because I like to have the latest version. I stuck with XP for years (after sticking with Windows ME for years, wow!) and switched to Vista with my new PC a few months ago. People are hopeful about Windows 7 &#8212; hopefully it works out better than the Vista release did.</p>
<p><strong>New Tutorial</strong><br />
I added one new tutorial this week: <a href="/php-function-return-values/">PHP Function Return Values</a>.</p>
<p><strong>Site Restructure</strong><br />
In Wordpress, you have Posts and Pages. Posts are used for blogging and Pages are used for static content, like an About or Contact page. I&#8217;ve been using the Pages to post my tutorials, but I thought about it and decided I&#8217;ll switch to using the Posts for them.</p>
<p>This will allow new tutorials to show up in the blog feed instead of requiring me to make a special post about the new pages on the site. I don&#8217;t know why I didn&#8217;t think about this to begin with, but it should be better for all you readers out there!</p>
]]></content:encoded>
			<wfw:commentRss>http://php-programming-tutorial.com/windows-7-is-out-new-tutorial-and-site-restructure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Programming Tutorial: Function Return Values</title>
		<link>http://php-programming-tutorial.com/php-function-return-values/</link>
		<comments>http://php-programming-tutorial.com/php-function-return-values/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 02:52:26 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://php-programming-tutorial.com/?page_id=363</guid>
		<description><![CDATA[In our last two tutorials, we&#8217;ve learned how to create our own functions and some things we can do with them. Another important thing to learn about PHP functions is how to return values. If you send a value from your function to your script, you use the return statement. In every function you create, [...]]]></description>
			<content:encoded><![CDATA[<p>In our last two tutorials, we&#8217;ve learned how to create our own functions and some things we can do with them. Another important thing to learn about PHP functions is how to return values. If you send a value from your function to your script, you use the return statement. In every function you create, it&#8217;s a good habit to return a value, even if this value is only a boolean (true or false). When you return a value, it sends the value back to the script and ends the function.</p>
<p>The most common example of return values is to show a function using the sum of two numbers, so I&#8217;ll do that here:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// This function will add two numbers and return the sum.</span>
<span style="color: #000000; font-weight: bold;">function</span> add_numbers<span style="color: #009900;">&#40;</span><span style="color: #000088;">$number1</span><span style="color: #339933;">,</span><span style="color: #000088;">$number2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$number1</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$number2</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// add two numbers, assign to $total variable</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$total</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// here is our return value!</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>A return statement can only return one value. It is possible to return multiple values by using an array, but that is something we&#8217;ll cover another time.</p>
<p>So now that we&#8217;ve created our function, let&#8217;s use it!</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// This function will add two numbers and return the sum.</span>
<span style="color: #000000; font-weight: bold;">function</span> add_numbers<span style="color: #009900;">&#40;</span><span style="color: #000088;">$number1</span><span style="color: #339933;">,</span><span style="color: #000088;">$number2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$number1</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$number2</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// add two numbers, assign to $total variable</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$total</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// here is our return value!</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> add_numbers<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// This will output 4 because 1 + 3 = 4.</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>And here&#8217;s another example with an If Statement:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// This function will add two numbers and return the sum.</span>
<span style="color: #000000; font-weight: bold;">function</span> add_numbers<span style="color: #009900;">&#40;</span><span style="color: #000088;">$number1</span><span style="color: #339933;">,</span><span style="color: #000088;">$number2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$number1</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$number2</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// add two numbers, assign to $total variable</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$total</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// here is our return value!</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_numbers<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">14</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$total</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Our total is greater than 10.&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Tell user the sum is greater than 10.</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Our total is less than 10.&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Tell user the sum is less than 10.</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Go back to <a href="/building-php-scripts/">Building PHP Scripts.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://php-programming-tutorial.com/php-function-return-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
