<?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>Marc Fraser &#124; Web Design and Development Blog</title>
	<atom:link href="http://www.marcfraser.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.marcfraser.co.uk</link>
	<description>A Web Design and Development Blog by Marc Fraser.  Marc Fraser is a student, situated in Central Scotland.</description>
	<lastBuildDate>Mon, 26 Oct 2009 21:06:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Smoking outside public places</title>
		<link>http://www.marcfraser.co.uk/smoking-outside-public-places-89.htm</link>
		<comments>http://www.marcfraser.co.uk/smoking-outside-public-places-89.htm#comments</comments>
		<pubDate>Mon, 26 Oct 2009 21:02:08 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[scotland]]></category>
		<category><![CDATA[smoking]]></category>
		<category><![CDATA[smoking ban]]></category>
		<category><![CDATA[smoking in public]]></category>

		<guid isPermaLink="false">http://www.marcfraser.co.uk/?p=89</guid>
		<description><![CDATA[I hate smoking. It is a horrible habit, and one that I've never once partaken, if I may add.
Basically, my gripe is nowadays when you want to enter a public building (a shopping center for example) you walk in with a headache, choking for breath, all the side effects of inhaling the smoke from others [...]]]></description>
			<content:encoded><![CDATA[<p>I hate smoking. It is a horrible habit, and one that I've never once partaken, if I may add.</p>
<p>Basically, my gripe is nowadays when you want to enter a public building (a shopping center for example) you walk in with a headache, choking for breath, all the side effects of inhaling the smoke from others cigarettes - otherwise known as 'passive smoking'.  Throw into the equation the putrid smell of cigarette smoke, it's horrible.</p>
<p>Obviously it is the smokers choice of whether to smoke or not, this doesn't bother me.  I'd rather people never smoked, but I guess someone has to prop up the public purse.  However, what really bothers me is that some people who choose to partake are so ignorant.</p>
<p>What I ask the smokers is that they refrain from standing at entrances/exits of public places; for the non-smokers it is horrible - for reasons defined above.</p>
<p>There are the people who stand at doorways smoking, but then there are the intensely ignorant people who think it is OK to <em>blow the smoke into your face</em>, or the people who don't at least try to exhale the smoke in a direction which is clear; which at the front of busy shopping centers cannot be done!</p>
<p>Basically what I ask people to do is smoke in the designated smoking areas.  By the way, I do not want to tar all smokers with the same brush, some already do this.</p>
<p>Also, the Government could do with bringing in legislation in which states something akin to  "Smoking 30-meters from a public building is not permitted"; this is if they haven't already - I had a look through the law, but nothing stood out at a quick glance.</p>
<p>Scottish legislation: <a href="http://www.opsi.gov.uk/legislation/scotland/acts2005/asp_20050013_en_2#pt1">http://www.opsi.gov.uk/legislation/scotland/acts2005/asp_20050013_en_2#pt1</a>.</p>
<p>Sorry for the very unstructured rant!  This has been a pet-hate of mine for a while, however it was only aggravated today by a terribly ignorant individual.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/smoking-outside-public-places-89.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Twitter</title>
		<link>http://www.marcfraser.co.uk/twitter-86.htm</link>
		<comments>http://www.marcfraser.co.uk/twitter-86.htm#comments</comments>
		<pubDate>Sat, 24 Oct 2009 18:05:39 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Marc Fraser]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.marcfraser.co.uk/?p=86</guid>
		<description><![CDATA[I've re-signed up to Twitter.
Please follow me (@marc_fraser): https://twitter.com/marc_fraser.
Thanks
Marc
]]></description>
			<content:encoded><![CDATA[<p>I've re-signed up to Twitter.</p>
<p>Please follow me (@marc_fraser): <a href="https://twitter.com/marc_fraser" target="_blank">https://twitter.com/marc_fraser</a>.</p>
<p>Thanks</p>
<p>Marc</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/twitter-86.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Mobile Phone</title>
		<link>http://www.marcfraser.co.uk/new-mobile-phone-84.htm</link>
		<comments>http://www.marcfraser.co.uk/new-mobile-phone-84.htm#comments</comments>
		<pubDate>Sat, 24 Oct 2009 18:01:17 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[3GS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://marcfraser.co.uk/new-mobile-phone-84.htm</guid>
		<description><![CDATA[After 6 months of the iPhone 3G, an upgrade is due!
I was so impressed with the iPhone 3G, that I've decided to get the latest version - the iPhone 3GS.  It should arrive on Wednesday; how it is getting here I don't yet know.  If its Royal Mail, I'll be lucky to see [...]]]></description>
			<content:encoded><![CDATA[<p>After 6 months of the iPhone 3G, an upgrade is due!</p>
<p>I was so impressed with the iPhone 3G, that I've decided to get the latest version - the iPhone 3GS.  It should arrive on Wednesday; how it is getting here I don't yet know.  If its Royal Mail, I'll be lucky to see it before Christmas!</p>
<p>I'll post my initial impressions when I receive it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/new-mobile-phone-84.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Trainers (Sneakers for US viewers!)</title>
		<link>http://www.marcfraser.co.uk/new-trainers-y3-73.htm</link>
		<comments>http://www.marcfraser.co.uk/new-trainers-y3-73.htm#comments</comments>
		<pubDate>Sat, 10 Oct 2009 21:44:48 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Y-3 trainers]]></category>

		<guid isPermaLink="false">http://marcfraser.co.uk/?p=73</guid>
		<description><![CDATA[Went shopping today in Edinburgh for a pair of Nike Air Max 90 in full white.  I really like Nike Air Max trainers -  I think they are really comfy.
Anyway, after browsing a few shops, I came to the conclusion that I'm looking to buy something which I can't actually buy and thus, had to [...]]]></description>
			<content:encoded><![CDATA[<p>Went shopping today in Edinburgh for a pair of Nike Air Max 90 in full white.  I really like Nike Air Max trainers -  I think they are really comfy.</p>
<p>Anyway, after browsing a few shops, I came to the conclusion that I'm looking to buy something which I can't actually buy and thus, had to go for an alternative.</p>
<p>Did I forget to mention that I'm a sucker for Adidas Y-3's?  Well, I am.  I bought what must be my 5th pair (not the same style!) of these trainers today - the other 3 are still in near perfect condition, one pair is wrecked due to walking through a field of mud after a football match.</p>
<p>Anyway, here's a picture of the ones I bought today:</p>
<div class="wp-caption alignnone" style="width: 428px"><img title="Y3 Trainers" src="https://www.vanmildert.com/mens-1/trainers-100/adidas-yamamoto-sprint-classic-145887-3142_zoom.jpg" alt="New Y3 Trainers" width="418" height="418" /><p class="wp-caption-text">New Y-3 Trainers</p></div>
<p>They are extremely comfy, like all Y-3's and the leather is very nice!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/new-trainers-y3-73.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Include</title>
		<link>http://www.marcfraser.co.uk/php-include-62.htm</link>
		<comments>http://www.marcfraser.co.uk/php-include-62.htm#comments</comments>
		<pubDate>Sat, 10 Oct 2009 10:32:26 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php include]]></category>

		<guid isPermaLink="false">http://marcfraser.co.uk/?p=62</guid>
		<description><![CDATA[(from Full Article)
The include command can save you a lot of time as you can create a header, place it in a file and just include that file on every page and the header will be shown. This will also mean that you do not need to edit every page every time you need to [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em><strong><em><a href="../introduction-to-php-tutorial-9.htm">(from Full Article)</a></em></strong></em></strong></p>
<p>The <a href="http://us.php.net/manual/en/function.include.php">include command</a> can save you a lot of time as you can create a header, place it in a file and just include that file on every page and the header will be shown. This will also mean that you do not need to edit every page every time you need to edit your header!</p>
<p>Basically the PHP Include command takes the file name and inserts the contents of the file into the script.</p>
<p>To illustrate this, I will use an example:</p>
<ol>
<li>Create a HTML file called Menu.html and insert the following code into it:</li>
</ol>
<pre class="brush: xml;">&lt;ul&gt;

&lt;li&gt;Home&lt;/li&gt;

&lt;li&gt;Articles&lt;/li&gt;

&lt;li&gt;Tutorial&lt;/li&gt;

&lt;/ul&gt;</pre>
<ol>
<li>Now create a menu_example.php PHP file (in the same directory as Menu.html) and insert:</li>
</ol>
<pre class="brush: php;">&lt;?php

include(‘Menu.html’);

?&gt;</pre>
<ol>
<li>Navigate to menu_example.php in your browser and run it – you should see:</li>
</ol>
<div>
<dl id="attachment_11" style="width: 146px;">
<dt><img title="Menu Example" src="http://marcfraser.co.uk/wp-content/uploads/2009/10/Picture-2.png" alt="Shows the menu that is being included." width="136" height="72" /></dt>
<dd>Menu Included.</dd>
</dl>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/php-include-62.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP IF Statement</title>
		<link>http://www.marcfraser.co.uk/php-if-statement-60.htm</link>
		<comments>http://www.marcfraser.co.uk/php-if-statement-60.htm#comments</comments>
		<pubDate>Sat, 10 Oct 2009 10:31:41 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php conditional statement]]></category>
		<category><![CDATA[php if]]></category>
		<category><![CDATA[php if statement]]></category>

		<guid isPermaLink="false">http://marcfraser.co.uk/?p=60</guid>
		<description><![CDATA[(from Full Article)
In PHP IF statements are extensively used.  It allows you to show the user data depending on certain conditions. The best way to describe it is with the use of an example: You want to build a dashboard with items you do not want all employees to see, this is where IF statements [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em><strong><em></em></strong></em></strong><strong><em><strong><em><a href="../introduction-to-php-tutorial-9.htm">(from Full Article)</a></em></strong></em></strong></p>
<p>In PHP <a href="http://us.php.net/manual/en/control-structures.if.php">IF statements</a> are extensively used.  It allows you to show the user data depending on certain conditions. The best way to describe it is with the use of an example: You want to build a dashboard with items you do not want all employees to see, this is where IF statements come in handy – you can check that they are a certain person or a member of a certain group and if this is true the employee can see the item, if it is false (the employee isn’t in the necessary group) then the employee shouldn’t see the items.</p>
<p>We will use <em>Comparison Operators </em>in the example below;</p>
<pre class="brush: php;">&lt;?php

$isManagement = false;

if($isManagement == true) {

// Show the data that you wish only management to see.

} else {

// You are not management and so cannot see this data.

}

?&gt;</pre>
<p>The above example uses comments to show how the if statement works in terms of the example farther above. $isManagement will come from the employees record.</p>
<p>Within the IF() statement we are comparing to see if $isManagement is true, within the first parenthesis ({}) is where the PHP code will go if the result is true. The else statement is included to catch all other occurrences apart from the true occurrences. Please see the <a href="http://us.php.net/manual/en/control-structures.else.php">PHP Manual</a> for another example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/php-if-statement-60.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Operators</title>
		<link>http://www.marcfraser.co.uk/php-operators-58.htm</link>
		<comments>http://www.marcfraser.co.uk/php-operators-58.htm#comments</comments>
		<pubDate>Sat, 10 Oct 2009 10:30:42 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[arithmetic operators]]></category>
		<category><![CDATA[assignment operators]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[php comparison operators]]></category>
		<category><![CDATA[string operators]]></category>

		<guid isPermaLink="false">http://marcfraser.co.uk/?p=58</guid>
		<description><![CDATA[(from Full Article)
Here are most types of PHP Operators: Assignment Operators, Arithmetic Operators, Comparison Operators, and String Operators.
Assignment Operators
We have already met this type. This is where we set a variable equal to something or make a variable equal to another variable.
Arithmetic Operators



English 
Operator
Example


Addition
+
1+1


Subtraction
-
5-3


Multiplication
*
5*2


Division
/
10/2



An example of the use of Arithmetic operators is shown below:
&#60;?php

$add = [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em><strong><em></em></strong></em></strong><strong><em><strong><em><a href="../introduction-to-php-tutorial-9.htm">(from Full Article)</a></em></strong></em></strong></p>
<p>Here are most types of PHP Operators: Assignment Operators, Arithmetic Operators, Comparison Operators, and String Operators.</p>
<p><span style="text-decoration: underline;">Assignment Operators</span></p>
<p>We have already met this type. This is where we set a variable equal to something or make a variable equal to another variable.</p>
<p><span style="text-decoration: underline;">Arithmetic Operators</span></p>
<table style="height: 83px;" border="1" cellspacing="0" cellpadding="0" width="278">
<tbody>
<tr>
<td width="142" valign="top"><strong>English </strong></td>
<td width="142" valign="top"><strong>Operator</strong></td>
<td width="142" valign="top"><strong>Example</strong></td>
</tr>
<tr>
<td width="142" valign="top">Addition</td>
<td width="142" valign="top">+</td>
<td width="142" valign="top">1+1</td>
</tr>
<tr>
<td width="142" valign="top">Subtraction</td>
<td width="142" valign="top">-</td>
<td width="142" valign="top">5-3</td>
</tr>
<tr>
<td width="142" valign="top">Multiplication</td>
<td width="142" valign="top">*</td>
<td width="142" valign="top">5*2</td>
</tr>
<tr>
<td width="142" valign="top">Division</td>
<td width="142" valign="top">/</td>
<td width="142" valign="top">10/2</td>
</tr>
</tbody>
</table>
<p>An example of the use of Arithmetic operators is shown below:</p>
<pre class="brush: php;">&lt;?php

$add = 1+1;

$subtract = 5-3;

$multiply = 5*2;

$divide = 10/2;

print “Addition Answer: ” . $add . “&lt;br&gt;”;

print “Subtraction Answer: ” . $subtract. “&lt;br&gt;”;

print “Multiplication Answer: ” . $multiply. “&lt;br&gt;”;

print “Addition Answer: ” . $divide. “&lt;br&gt;”;

?&gt;</pre>
<p>The output of the above code is:</p>
<blockquote><p>Addition Answer: 2<br />
Subtraction Answer: 2<br />
Multiplication Answer: 10<br />
Addition Answer: 5</p></blockquote>
<p>This showing that the server is carrying out the calculations, using our arithmetic operators. As well as the above, you could also use these operators in conjunction with each other like so:</p>
<pre class="brush: php;">&lt;?php

$quantity = 4;

$value = 5;

$total = $quantity * $value;

print $total;

?&gt;</pre>
<p>The output from the above is 20.</p>
<p><span style="text-decoration: underline;">Comparison Operators</span></p>
<p>Comparison Operators are used to check the relationship between variables/values. These are used inside statements (such as if statements) to check whether the result is true or false. Listed are some PHP comparison operators:</p>
<p><em>We will assume, for this example, that $a = 2 and $b = 3.</em></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="134" valign="top"><strong>English</strong></td>
<td width="71" valign="top"><strong>Operator</strong></td>
<td width="99" valign="top"><strong>Example</strong></td>
<td width="99" valign="top"><strong>Result</strong></td>
</tr>
<tr>
<td width="134" valign="top">Equal to</td>
<td width="71" valign="top">==</td>
<td width="99" valign="top">$a == $b</td>
<td width="99" valign="top">False</td>
</tr>
<tr>
<td width="134" valign="top">Not equal to</td>
<td width="71" valign="top">!=</td>
<td width="99" valign="top">$a != $b</td>
<td width="99" valign="top">True</td>
</tr>
<tr>
<td width="134" valign="top">Less than</td>
<td width="71" valign="top">&lt;</td>
<td width="99" valign="top">$a &lt; $b</td>
<td width="99" valign="top">True</td>
</tr>
<tr>
<td width="134" valign="top">Greater than</td>
<td width="71" valign="top">&gt;</td>
<td width="99" valign="top">$a &gt; $b</td>
<td width="99" valign="top">False</td>
</tr>
<tr>
<td width="134" valign="top">Less than or equal to</td>
<td width="71" valign="top">&lt;=</td>
<td width="99" valign="top">$a &lt;= $b</td>
<td width="99" valign="top">True</td>
</tr>
<tr>
<td width="134" valign="top">Greater than or equal to</td>
<td width="71" valign="top">&gt;=</td>
<td width="99" valign="top">$a &gt;= $b</td>
<td width="99" valign="top">False</td>
</tr>
</tbody>
</table>
<p>Please note the two equal signs in the equal to example – this is a common beginners’ mistake.</p>
<p>We will go into further examples of Comparison Operators in the next section on <em>PHP If Statements</em>.</p>
<p><span style="text-decoration: underline;">String Operators</span></p>
<p>We have already met String Operators, please read prior section named <em>Concatenation.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/php-operators-58.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Concatenation</title>
		<link>http://www.marcfraser.co.uk/php-concatenation-56.htm</link>
		<comments>http://www.marcfraser.co.uk/php-concatenation-56.htm#comments</comments>
		<pubDate>Sat, 10 Oct 2009 10:28:54 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php concatenation]]></category>

		<guid isPermaLink="false">http://marcfraser.co.uk/?p=56</guid>
		<description><![CDATA[(from Full Article)
We can display our variables in a meaningful fashion with the use of concatenation. Concatenation makes use of the period (.). Please see the example below which is an example of affixing a value to the end of the variable:
&#60;?php

$name = “Marc”;

$name .= “Fraser”;

?&#62;
Basically what ‘.=’ is doing is saying use the current [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em><strong><em></em></strong></em></strong><strong><em><strong><em><a href="../introduction-to-php-tutorial-9.htm">(from Full Article)</a></em></strong></em></strong></p>
<p>We can display our variables in a meaningful fashion with the use of <em>concatenation</em>. Concatenation makes use of the period (.). Please see the example below which is an example of affixing a value to the end of the variable:</p>
<pre class="brush: php;">&lt;?php

$name = “Marc”;

$name .= “Fraser”;

?&gt;</pre>
<p>Basically what ‘.=’ is doing is saying use the current value of $name and add “Fraser” to the end of it. If I were to now print $name, it would output “MarcFraser”.</p>
<p>We can also use concatenation to create readable sentences:</p>
<pre class="brush: php;">&lt;?php

$name = “ Marc Fraser”;

$age = 16;

print “We would like to welcome you,” . $name . “, age” . $age . “ to our website!”;

?&gt;</pre>
<p>This will output “We would like to welcome you, Marc Fraser, age 16 to our website!”. To do this, we close the string (close quotation mark) and add our period, which tells the server that we wish to begin parsing PHP again. When we want to stop parsing PHP we add a period and then begin our string again (quotation mark).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/php-concatenation-56.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP Variables</title>
		<link>http://www.marcfraser.co.uk/php-variables-54.htm</link>
		<comments>http://www.marcfraser.co.uk/php-variables-54.htm#comments</comments>
		<pubDate>Sat, 10 Oct 2009 10:27:07 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php variables]]></category>

		<guid isPermaLink="false">http://marcfraser.co.uk/?p=54</guid>
		<description><![CDATA[(from Full Article)
Variables are important to PHP. A variable is a way of storing a value, such as text (“Hello”), numeric values (such as the integer value of 1) and also Boolean values (true and false). A variable can be re-used throughout your code instead of typing out the value over and over again. Variables [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em><strong><em></em></strong></em></strong><strong><em><strong><em><a href="../introduction-to-php-tutorial-9.htm">(from Full Article)</a></em></strong></em></strong></p>
<p>Variables are important to PHP. A variable is a way of storing a value, such as text (“Hello”), numeric values (such as the integer value of 1) and also Boolean values (true and false). A variable can be re-used throughout your code instead of typing out the value over and over again. Variables will also not be new to you if you’ve had any experience of Algebra in Mathematics.</p>
<p>You define a variable in PHP like so:</p>
<pre class="brush: php;">&lt;?php

$name = “Marc Fraser”;

$age = 16;

?&gt;</pre>
<p>The first things you should notice is the dollar sign ($). In PHP this signifies that the item is a variable, I can name a variable whatever I wish such as $a, $b, $c, as long as I do not omit it – otherwise syntax errors will occur. At this time, you should also note that variables are case sensitive, therefore $a is different in the eyes of PHP than $A.</p>
<p>Once our data is stored in a variable, we can perform operations to it, such as print, string manipulation and if the variable is an integer, calculations can be done. Below is how to print a variable:</p>
<pre class="brush: php;">&lt;?php

$name = “Marc Fraser”;

$age = 16;

print $name;

print $age;

?&gt;</pre>
<p>The above will output “Marc Fraser16”.</p>
<p><span style="text-decoration: underline;">Variable naming conventions:</span></p>
<ul>
<li>PHP Variables may only start with a letter or underscore (_).</li>
<li>Spaces are not permitted in PHP variables and so underscores, or capitalization should be used – such as: $this_variable, $thisVariable.</li>
<li>Variables may only comprise of alphanumeric characters.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/php-variables-54.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outputting HTML using PHP [+ Semicolons]</title>
		<link>http://www.marcfraser.co.uk/outputting-html-using-php-semicolons-50.htm</link>
		<comments>http://www.marcfraser.co.uk/outputting-html-using-php-semicolons-50.htm#comments</comments>
		<pubDate>Sat, 10 Oct 2009 10:24:23 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[output html with php]]></category>
		<category><![CDATA[php semicolons]]></category>

		<guid isPermaLink="false">http://marcfraser.co.uk/?p=50</guid>
		<description><![CDATA[(from Full Article)
Semicolons
Semicolons are used extensively in PHP. The semicolon generally (there are exceptions) signifies the end of a PHP statement and should not be forgotten, otherwise unsightly errors will occur. An example will be shown in the Outputting HTML code using PHP section.
Outputting HTML code using PHP
Outputting HTML code using PHP is extremely easy. [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em><strong><em></em></strong></em></strong><strong><em><strong><em><a href="../introduction-to-php-tutorial-9.htm">(from Full Article)</a></em></strong></em></strong></p>
<p><strong><em>Semicolons</em></strong></p>
<p>Semicolons are used extensively in PHP. The semicolon <em>generally</em> (there are exceptions) signifies the end of a PHP statement and should not be forgotten, otherwise unsightly errors will occur. An example will be shown in the <em>Outputting HTML code using PHP</em> section.</p>
<p><strong><em>Outputting HTML code using PHP</em></strong></p>
<p>Outputting HTML code using PHP is extremely easy. It can be done using the <a href="http://uk2.php.net/print">PHP Print</a> command or indeed <a href="http://uk.php.net/echo">PHP Echo</a>. The difference between the two commands can be read on the <a href="http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40">PHP FAQts</a> site.</p>
<p>Below is how to output “This is my first output PHP string” in HTML paragraph and bold tags. This example will also show how the semicolon is used (read prior section, <em>Semicolons</em>).</p>
<pre class="brush: php;">&lt;html&gt;

&lt;head&gt;

&lt;title&gt;My first PHP outputs&lt;/title&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;?php

print “&lt;p&gt;&lt;strong&gt;This is my first output PHP string&lt;/strong&gt;&lt;/p&gt;”;

// For consistency I will show the use of the echo command

echo “&lt;p&gt;&lt;strong&gt;This is my first output PHP string&lt;/strong&gt;&lt;/p&gt;”;

?&gt;

&lt;/body&gt;

&lt;/html&gt;</pre>
<p>If you run the above code, you will see that you get the output:</p>
<div>
<dl id="attachment_10" style="width: 260px;">
<dt><img title="First PHP output" src="http://marcfraser.co.uk/wp-content/uploads/2009/10/Picture1.png" alt="First PHP output" width="250" height="76" /></dt>
<dd>First PHP output.</dd>
</dl>
</div>
<p>The first line is of the print command and the second line is the output of the echo command. Please note that there is no difference between the two. Please also note the usage of quotation marks – these are used to tell the PHP code that we wish not to execute the contents contained within.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/outputting-html-using-php-semicolons-50.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
