<?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; A Blog about all things</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 blog about all things personal, web related.</description>
	<lastBuildDate>Fri, 23 Apr 2010 13:50:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New Mobile Phone</title>
		<link>http://www.marcfraser.co.uk/new-mobile-phone-2-99.htm</link>
		<comments>http://www.marcfraser.co.uk/new-mobile-phone-2-99.htm#comments</comments>
		<pubDate>Fri, 23 Apr 2010 13:50:09 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Blackberry Bold 9700]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone 3G]]></category>
		<category><![CDATA[iPhone 3GS]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[Microsoft Exchange]]></category>
		<category><![CDATA[Twitter app]]></category>

		<guid isPermaLink="false">http://www.marcfraser.co.uk/?p=99</guid>
		<description><![CDATA[I'm sure you'll be pleased to here that I have another new mobile telephone!
In October 2009, you may remember that I received an iPhone 3GS, well it proved to be a short-lived phone.  Before I had the iPhone 3GS, I had its predecessor, the iPhone 3G; both were great phones, the 3G more than the [...]]]></description>
			<content:encoded><![CDATA[<p>I'm sure you'll be pleased to here that I have <em>another </em>new mobile telephone!</p>
<p>In October 2009, you may remember that I received an iPhone 3GS, well it proved to be a short-lived phone.  Before I had the iPhone 3GS, I had its predecessor, the iPhone 3G; both were great phones, the 3G more than the 3GS - more on this upcoming!</p>
<p>So, you'll be busting a gut to here that I now have  a Blackberry Bold 9700.  Now, you may be wondering, why I changed and how I changed so early.</p>
<p>First and foremost the reason I changed was because I pure and simple was bored of the iPhone.  After having the 3G for 1 year, and the 3GS for 3 months, I was getting fed up of a touch-screen phone.  However bored I was of the touch-screen, I wouldn't have gotten rid of it until the screen smashed whilst on holiday at the end of December.  By the way, in NO WAY (no joke here) did I mean to smash the phone's screen: it fell out the pocket of my shorts when I jumped, landed on its bottom and cracked.</p>
<p>Fair play to Apple, however, as the phone <em>did </em>work with a smashed screen - which I was surprised at - however it was a health hazard!  I could have sent it away for mending, by the insurance company, but luckily I was due a phone from O2 anyway.</p>
<p>I hear you say "how the hell can he be due a new phone only 3 months after receiving one", well you are right.  I'm lucky in that when I got the 3GS, it was a new contract that was taken out for my sister - but she got my old 3G and I manage to wangle to get the 3GS!  It is all pretty messy...</p>
<p>Anyhow, I chose the Blackberry Bold 9700 to get away from the iPhone, and I have to say: I don't miss the iPhone one bit.</p>
<p>The email client on the Blackberry is so much better.  I never used to be able to get my Microsoft Exchange emails directly to my iPhone (had to log into Webmail every time), but now the phone alerts me when I have an email.</p>
<p>I also much prefer the physical keyboard on the Blackberry compared to the on-screen one of the iPhone.</p>
<p>As for Apps for each phone, I grant the iPhone has a better (much better) app collection, but I never really used them - apart from the Twitter app.  Now that Blackberry has its own Twitter app, I'm as happy as Larry (who is Larry anyway?)</p>
<p>The thing I most miss from my iPhone is iTunes.  I used to love how well it integrated into iTunes - but the Blackberry does the job - and it copies Playlists.</p>
<p>Overall, I'm happy with my choice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/new-mobile-phone-2-99.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neglect</title>
		<link>http://www.marcfraser.co.uk/neglect-96.htm</link>
		<comments>http://www.marcfraser.co.uk/neglect-96.htm#comments</comments>
		<pubDate>Fri, 23 Apr 2010 13:26:19 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[neglect]]></category>
		<category><![CDATA[retrospective]]></category>

		<guid isPermaLink="false">http://www.marcfraser.co.uk/?p=96</guid>
		<description><![CDATA[Neglected.   Neglected is the only way to describe this website!
I’m sorry for not updating in so long, being totally honest, I forgot.  Simply forgot.  I have been really busy over the last few months since I updated, and so I'm going to update this blog retrospectively.  Although most blogs are filled retrospectively [...]]]></description>
			<content:encoded><![CDATA[<p>Neglected.   Neglected is the only way to describe this website!</p>
<p>I’m sorry for not updating in so long, being totally honest, I forgot.  Simply forgot.  I have been really busy over the last few months since I updated, and so I'm going to update this blog retrospectively.  Although most blogs are filled retrospectively (how many people can see into the future?), some are filled in more retrospectively than others - i.e. mine - in it's current state!</p>
<p>So, here goes; how long will I last filing out a blog this time?  Keep tuned for some new posts!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcfraser.co.uk/neglect-96.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>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 Tutorials]]></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 Tutorials]]></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 Tutorials]]></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 Tutorials]]></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 Tutorials]]></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>
	</channel>
</rss>
