<?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>SCRIBBLE IT &#187; PHP</title>
	<atom:link href="http://www.scribbleit.co.uk/blog/category/technology/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scribbleit.co.uk/blog</link>
	<description>Web Development with WordPress and Thesis</description>
	<lastBuildDate>Mon, 19 Jul 2010 18:16:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to edit remote files in Microsoft Expression Web 3</title>
		<link>http://www.scribbleit.co.uk/blog/2009/12/02/how-to-edit-remote-files-in-microsoft-expression-web-3/</link>
		<comments>http://www.scribbleit.co.uk/blog/2009/12/02/how-to-edit-remote-files-in-microsoft-expression-web-3/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 16:29:19 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Software Recommendations]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=396</guid>
		<description><![CDATA[I&#8217;m just starting to experiment with Expression Web 3 as a site editor (specifically for editing PHP, CSS and Javascript files) and the first stumbling block was how to set it up so that I can edit my remote files directly without having to create a local version. This is necessary because I don&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://www.scribbleit.co.uk/blog/2009/12/02/how-to-edit-remote-files-in-microsoft-expression-web-3/" title="Permanent link to How to edit remote files in Microsoft Expression Web 3"><img class="post_image alignnone" src="http://www.scribbleit.co.uk/blog/wp-content/uploads/2009/12/expression.png" width="684" height="434" alt="Post image for How to edit remote files in Microsoft Expression Web 3" /></a>
</p><p>I&#8217;m just starting to experiment with Expression Web 3 as a site editor (specifically for editing PHP, CSS and Javascript files) and the first stumbling block was how to set it up so that I can edit my remote files directly without having to create a local version. This is necessary because I don&#8217;t have PHP/MySQL and Apache installed on my Windows machine.</p>
<p>Despite the fact that this doesn&#8217;t appear to be mentioned in the application help, it&#8217;s actually very simple. Just go to File, Open and, in the address bar, type your FTP address. You&#8217;ll then be prompted to type in your login details and, assuming this has worked successfully, you&#8217;ll then be presented with an Explorer view of your site from which you can pick your file. Simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2009/12/02/how-to-edit-remote-files-in-microsoft-expression-web-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First steps in object oriented PHP</title>
		<link>http://www.scribbleit.co.uk/blog/2009/10/27/first-steps-in-object-oriented-php/</link>
		<comments>http://www.scribbleit.co.uk/blog/2009/10/27/first-steps-in-object-oriented-php/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 21:17:13 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=360</guid>
		<description><![CDATA[PHP gets a bad press from time to time, largely because its very flexibility is seen as laxness by the tight sphincter brigade. However, just because PHP doesn&#8217;t force &#8220;best practice&#8221; on programmers doesn&#8217;t mean you can&#8217;t adopt said best practice. Object oriented programming is much talked about and has many advantages over the old-school [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>PHP gets a bad press from time to time, largely because its very flexibility is seen as laxness by the tight sphincter brigade. However, just because PHP doesn&#8217;t <strong>force</strong> &#8220;best practice&#8221; on programmers doesn&#8217;t mean you can&#8217;t adopt said best practice.</p>
<p>Object oriented programming is much talked about and has many advantages over the old-school line-based procedural code. You&#8217;re probably familiar with functions (blocks of code called independently: they used to be called subroutines in the old days). Objects are groups of function which are, to some degree, &#8220;self aware&#8221;. By this I mean that values can be passed within the objects to allow the object to take the appopriate actions.</p>
<p>Enough of theory, I want to give a concrete example of how using objects can be, in a very practical, sense a timesaver. I&#8217;m going to show you how to create a very useful database object which can be used to make connecting to the database, retrieving and storing data much simpler.<span id="more-360"></span></p>
<p>Right, open up your favourite editor: mine is <a href="http://www.mpsoftware.dk/phpdesigner.php" target="_blank">PHPDesigner</a> although a good free alternative is <a href="http://www.pspad.com" target="_blank">PSPad</a>. I&#8217;m assuming you have a working MySQL database and want to connect to it. If you&#8217;re at all familiar with interacting with MySQL, you know that there are three stages involved in retrieving information: connecting to the database, running the query and processing it. Let&#8217;s start by dealing with the first of these and automating the connection.</p>
<p>Create a blank PHP file and give it a name. I tend to use a two part convention: the first part of the name describes the purpose of the class, the second indicates the author. So, in this case, we might call it DbaseSB .php (SB=Scribbleit).</p>
<p>Here&#8217;s the inital code:</p>
<pre>&lt; ?php
//DATABASE CONNECTION/MANIPULATION OBJECT
//AUTHOR: KEVIN PARTNER
class DbaseSB
{
	private $DB_HOST="localhost";
	private $DB_NAME="mydbname";
	private $DB_USER="mydbuser";
	private $DB_PASSWORD="mydbpassword";
	private $connection;</pre>
<p>You can see that we begin with the keyword &#8220;class&#8221; followed by the name of the class. This MUST be the same as the name of the PHP file. Following this is a series of variable definitions. <strong>private</strong><strong> indicates that these variables are only accessible within the object: this is for security reasons and because these variables are only needed by the database object.</strong></p>
<p><strong> </strong></p>
<p><strong>The variable names should be self explanatory except for </strong><strong>$connection</strong> which is a variable I&#8217;m going to use to store the database connection once it&#8217;s made.</p>
<p>Now for the next bit:</p>
<pre>function __construct()//CONSTRUCTOR FUNCTION WHICH IS RUN WHEN THE OBJECT IS CREATED
	{
		$this-&gt;connection = mysql_connect($this-&gt;DB_HOST, $this-&gt;DB_USER, $this-&gt;DB_PASSWORD) or die("unable to connect to database");

		$db_select=mysql_select_db($this-&gt;DB_NAME,$this-&gt;connection);

		if(!$db_select)
		{
			die("Database selection failed: ".mysql_error());
		}
	}</pre>
<p>This code immediately follows the first block. The <strong>__construct</strong> magic method is run automatically when the object is created (we&#8217;ll see how to do that in a bit) so what this code achieves is to create a database connection automatically using the details you&#8217;ve supplied. This connection is then stored in the <strong>$connection</strong> variable for use later.</p>
<p>You&#8217;ll notice that <strong>$connection</strong> is expressed as <strong>$this-&gt;connection</strong>. The identifier <strong>$this</strong> represents the current object so what it&#8217;s saying is &#8220;my copy of $connection&#8221; since you could have many objects running at once based on a single class.</p>
<p>Moving right along, this code immediately follows the last block:</p>
<pre>	function query($query)
	{
		$querydata=mysql_query($query);
		$this-&gt;confirm_query($querydata);
		return($querydata);
	}

	function confirm_query($result_set)
	{
		if (!$result_set) {
			die("Database query failed: " . mysql_error());
		}
	}</pre>
<p>The first method (functions are called methods when they&#8217;re inside an object, go figure) wraps up any MySQL query and runs it. <strong>confirm_query</strong> checks to see that a valid result was achieved and, if not, echoes out the error returned.</p>
<p>Now, this might seem like a lot of work just to do some database stuff but the beauty is that you only have to do it once (and you can, after all, copy and paste it from here). This class can now connect to a database and execute a query. All that&#8217;s left now is to add some general purpose queries that will shield you from having to remember the MySQL code.</p>
<p>So, let&#8217;s now add one such general purpose method:</p>
<pre>	function fetchfield($table,$indexname,$indexvalue,$fieldname)
	{
	    $query="SELECT * FROM $table WHERE $indexname=$indexvalue";
	    $querydata=$this-&gt;query($query);
	    $fielddata=mysql_fetch_assoc($querydata);
	    return $fielddata[$fieldname];
	}
}
?&gt;</pre>
<p>As its name suggests, <strong>fetchfield</strong> will pull out a single field from a single row of a database.</p>
<p>Ok, that completes our class for now: let&#8217;s look at how we would use that in a PHP script. So, create a script (for example &#8220;index.php&#8221;) in the usual way. For now, I suggest putting it in the same folder as the class but that&#8217;s not generally a good idea as it&#8217;s best to have your classes all together.</p>
<pre>&lt; ?php
require_once("DbaseSB.php");
$dbobject=new DbaseSB();

$userid=1001;

$firstname=$dbobject-&gt;fetchfield("users","userid",$userid,"firstname";
echo($firstname);
?&gt;</pre>
<p>In the first line, we include the php class file. The second line shows how to create an object from the class. A &#8220;class&#8221; is the blueprint, the definition of the object. Just as you can build many houses from one blueprint, you can create as many objects as you like from one class and each can have its own variable values etc. Most often, you&#8217;ll just create a single copy as here.</p>
<p><strong>Important note:</strong>Remember that, in creating (&#8220;instantiating&#8221;) our object, it automatically connects to the database: you don&#8217;t have to carry out that step.</p>
<p>We then define a variable for testing purposes. On the next line, you can see how we access our object&#8217;s single method, <strong>fetchfield</strong>. In this case, the table name is &#8220;users&#8221;, the index we&#8217;re using to identify the row containing the field is called &#8220;user id&#8221;, the actual value of userid is $userid and the field we want to fetch is &#8220;firstname&#8221;.</p>
<p>A very simple but powerful example. Now that the object is created, we can use it anywhere on this page without recreating it. Adding new methods makes it progressively more powerful, allowing you to use MySQL without using MySQL, if you see what I mean. That single line of code has replaced at least 7 lines if you don&#8217;t include the connection. The more complex the method, the greater the time saving.</p>
<p>Furthermore, each time you add a method it becomes available across your whole site AND you can up and move your entire library to a new site for a new project and all you need to change is the connection information. Convinced yet?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2009/10/27/first-steps-in-object-oriented-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VisiBone</title>
		<link>http://www.scribbleit.co.uk/blog/2009/04/07/visibone/</link>
		<comments>http://www.scribbleit.co.uk/blog/2009/04/07/visibone/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 10:19:09 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Personal Thoughts]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=188</guid>
		<description><![CDATA[If you&#8217;re a web developer or designer you should get yourself over to www.visibone.com. VisiBone sell paper-based, cut down references for designers and developers including everything from colour charts to MySQL commands. I ordered the &#8220;Everything Book&#8221; on the 1st April, it arrived (from the US) 2 working days later and it&#8217;s one of those [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img class="alignleft size-medium wp-image-189" title="The Everything Book" src="http://www.scribbleit.co.uk/blog/wp-content/uploads/2009/04/book_w-182x300.jpg" alt="The Everything Book" width="182" height="300" />If you&#8217;re a web developer or designer you should get yourself over to <a href="http://www.visibone.com" target="_blank">www.visibone.com</a>. VisiBone sell paper-based, cut down references for designers and developers including everything from colour charts to MySQL commands.</p>
<p>I ordered the &#8220;Everything Book&#8221; on the 1st April, it arrived (from the US) 2 working days later and it&#8217;s one of those products you didn&#8217;t know you needed until you saw it. This book contains a colour reference chart on the front cover, HTML character codes, HTML and CSS reference, JavaScript, PHP and MySQL all printed on heavy paper and wire-bound.</p>
<p>The product has been put together beautifully and thoughtfully with the most commonly required stuff at the front. No more endless searching for colour values and HTML entities: it&#8217;s all here. I speak as an experienced web developer: I know my PHP and MySQL but I often need my memory jogged and this product now occupies a permanent place on my desk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2009/04/07/visibone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a basic PHP template</title>
		<link>http://www.scribbleit.co.uk/blog/2009/02/09/how-to-create-a-basic-php-template/</link>
		<comments>http://www.scribbleit.co.uk/blog/2009/02/09/how-to-create-a-basic-php-template/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 16:51:30 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=172</guid>
		<description><![CDATA[When you&#8217;re creating a website with lots of pages all using the same look and feel, headers, CSS etc, it obviously makes sense to create a simple template. Begin by creating a page in XHTML/HTML that looks and works exactly as you wish. Now cut and paste the header into a new file and put [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When you&#8217;re creating a website with lots of pages all using the same look and feel, headers, CSS etc, it obviously makes sense to create a simple template.</p>
<p>Begin by creating a page in XHTML/HTML that looks and works exactly as you wish. Now cut and paste the header into a new file and put it into a folder called /includes/ on your server. This should be saved as something like <strong>header.php</strong>. Don&#8217;t worry that it&#8217;s not actually PHP code, that doesn&#8217;t matter. Do the same thing for your main navigation (the navigation that will remain the same throughout). You could put that in header.php but I like to keep it separate just in case there are rare cases where the navigation isn&#8217;t needed on a particular page. If you have subnavigation that changes section by section isolate that and put it in its own php file and finally, do the same thing for your footer.<span id="more-172"></span></p>
<p>You should now have an HTML file with just the content in it. Assuming you&#8217;ve used the same file names and structure as me, you&#8217;ll need to add the following code to the top of your HTML pages:</p>
<blockquote><p>&lt;?php<br />
require($_SERVER['DOCUMENT_ROOT'].&#8221;/includes/header.php&#8221;);<br />
require($_SERVER['DOCUMENT_ROOT'].&#8221;/includes/subnav_home.php&#8221;);<br />
require($_SERVER['DOCUMENT_ROOT'].&#8221;/includes/navigation.php&#8221;);<br />
?&gt;</p></blockquote>
<p>This approach ensures that, whatever the structure of your site, your script can find the php/HTML files it needs to include.</p>
<p>Right at the end of your page add these lines:</p>
<blockquote><p>&lt;?php<br />
require($_SERVER['DOCUMENT_ROOT'].&#8221;/includes/footer.php&#8221;);<br />
?&gt;</p></blockquote>
<p>You should rename the file so that it has a .php extension rather than .html so that your server will process it as PHP.</p>
<p>Test it to see that it still looks the same as the original file and, if it works, you can now create new web pages by simply adding the indicated lines at the beginning and end and then just writing content using standard XHTML between them. The big advantage is that, when you change your site navigation or anything else that appears in those included files, you only have to do it once.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2009/02/09/how-to-create-a-basic-php-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache</title>
		<link>http://www.scribbleit.co.uk/blog/2008/10/16/apache/</link>
		<comments>http://www.scribbleit.co.uk/blog/2008/10/16/apache/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 13:39:47 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=134</guid>
		<description><![CDATA[Let&#8217;s say that you want to add a file upload facility to your website via PHP. The key to this is to ensure that the permissions on the folder you are copying up to allow PHP to do the copying. This is a classic Gotcha that can waste a whole load of time. The first [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Let&#8217;s say that you want to add a file upload facility to your website via PHP. The key to this is to ensure that the permissions on the folder you are copying up to allow PHP to do the copying. This is a classic Gotcha that can waste a whole load of time.</p>
<p>The first thing you need to know is that the folder you&#8217;re copying up to must be &#8220;Owned&#8221; by &#8220;Apache&#8221; rather than the site owner. In other words, you need to set the permissions on the folder to be owned by Apache. This then leads onto the other question &#8220;what is the Apache OwnerID?&#8221;.</p>
<p>I spent a good couple of hours trying to find an answer to this question. The owner Id can be found in the configuration files but a MUCH easier way is to create a PHP file containing the line:</p>
<blockquote><p>&lt;?php<br />
Â echo phpinfo();<br />
?&gt;</p></blockquote>
<p>Run this file in your browser, scroll down to the &#8220;apache2handler&#8221; section and you&#8217;ll see &#8220;User/Group&#8221; listed. The numbers next to this show first the OwnerId and then the GroupId (usually both the same). Use a tool such as BitVise Tunnelier to log into your web server and set the Owner and Group to this number and PHP will then be able to copy to that folder. Take care only to change ownership of those folders you specifically want to be able to upload files to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2008/10/16/apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s hear it for HEREDOC</title>
		<link>http://www.scribbleit.co.uk/blog/2008/09/08/lets-hear-it-for-heredoc/</link>
		<comments>http://www.scribbleit.co.uk/blog/2008/09/08/lets-hear-it-for-heredoc/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 13:05:41 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[heredoc]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=130</guid>
		<description><![CDATA[I&#8217;ve been using PHP seriously for a while now, and overall I think it&#8217;s the most productive programming language I&#8217;ve ever encountered. However, one of the things, as a PHP programmer, you need to do on a regular basis is to output HTML to the browser in order to draw web pages. The problem is [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;ve been using PHP seriously for a while now, and overall I think it&#8217;s the most productive programming language I&#8217;ve ever encountered. However, one of the things, as a PHP programmer, you need to do on a regular basis is to output HTML to the browser in order to draw web pages.</p>
<p>The problem is that HTML uses the &#8221; (quote) character and so does PHP so, if you want to use a bit of HTML like this:</p>
<blockquote><p>&lt;p class=&#8221;indentedbody&#8221;&gt;Here is some text.&lt;/p&gt;</p></blockquote>
<p>you need to handle them specially in PHP. <span id="more-130"></span></p>
<p>The simplest way is:</p>
<blockquote><p>&lt;?php echo(&#8220;&lt;p class=&#8217;indentedbody&#8217;&gt;Here is some text.&lt;/p&gt;&#8221;);?&gt;</p></blockquote>
<p>&#8230;in other words to replace quotes with single quotes. The main disadvantage is that it means if you want to use a variable in the html (eg to replace the &#8220;Here is some text&#8221;) you need to concatenate (glue) them together like this:</p>
<blockquote><p>&lt;?php<br />
$thetext=&#8221;Here is some text&#8221;;<br />
echo &#8220;&lt;p class=&#8217;indentedbody&#8217;&gt;&#8221;.$thetext.&#8221;&lt;/p&gt;&#8221;;<br />
?&gt;</p></blockquote>
<p>&#8230;note the &#8220;.&#8221; character which concatenates strings. It may not look like too much of a problem but the more variables that need to be inserted, the messier and harder to understand it becomes.</p>
<p>Another option is to &#8220;escape&#8221; the html quotes like this:</p>
<blockquote><p>&lt;?php<br />
$thetext=&#8221;Here is some text&#8221;;<br />
echo &#8220;&lt;p class=\&#8221;indentedbody\&#8221;&gt;$thetext&lt;/p&gt;&#8221;;<br />
?&gt;</p></blockquote>
<p>..so the \ has been used to tell PHP that the &#8221; is a literal quote, not the end of a string of characters. Again, this works for small blocks of text but is a major pain in the backside for complex HTML. I&#8217;ve worked around this in the past by doing a &#8220;search and replace&#8221; in my programming environment, swapping all &#8221; characters for \&#8221; pairs.</p>
<p>But there&#8217;s an easier way and it&#8217;s been around for ages. It&#8217;s just that almost no-one uses it. Here it is</p>
<blockquote><p>&lt;?php<br />
$thetext=&#8221;Here is some text&#8221;;<br />
echo &lt;&lt;&lt;MYHTML<br />
&lt;p class=&#8221;indentedbody&#8221;&gt;$thetext&lt;/p&gt;<br />
MYHTML;<br />
?&gt;</p></blockquote>
<p>Bascially, what&#8217;s going on is that the string &#8220;MYHTML&#8221; replaces the quotes as the delimiter: in other words, instead of putting &#8221; at the start and end, we put MYHTML. This means that, as long as we don&#8217;t use the characters &#8220;MYHTML&#8221; within the string, we can use double quotes as we like so the whole thing is much more readable and easy to edit.</p>
<p>The heredoc syntax as applied to PHP is a bit fussy so check the manual but this is going to be a major timesaver for anyone using either of the other two techniques.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2008/09/08/lets-hear-it-for-heredoc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPDesigner 2008</title>
		<link>http://www.scribbleit.co.uk/blog/2008/06/04/phpdesigner-2008/</link>
		<comments>http://www.scribbleit.co.uk/blog/2008/06/04/phpdesigner-2008/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 10:13:50 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php ide]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=119</guid>
		<description><![CDATA[It seems that my endless search for the ideal PHP IDE has finally&#8230;er&#8230;ended. phpDesigner 2008 is the most promising environment I&#8217;ve seen and even though I&#8217;ve only just started using it, it&#8217;s already seen Zend Studio Pro and the treacle-like Zend Studio Eclipse confined to the recycle bin. Remarkably, phpDesigner is the work of one [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.pcpro.co.uk/blogs/wp-content/uploads/2008/06/phpdesigner20081.jpg"><img class="alignnone size-thumbnail wp-image-1215" title="phpdesigner2008" src="http://www.pcpro.co.uk/blogs/wp-content/uploads/2008/06/phpdesigner20081-150x150.jpg" alt="phpDesigner 2008 PHP editing environment" width="150" height="150" /></a>It seems that my endless search for the ideal PHP IDE has finally&#8230;er&#8230;ended. phpDesigner 2008 is the most promising environment I&#8217;ve seen and even though I&#8217;ve only just started using it, it&#8217;s already seen Zend Studio Pro and the treacle-like Zend Studio Eclipse confined to the recycle bin.</p>
<p><span id="more-119"></span></p>
<p>Remarkably, phpDesigner is the work of one man, Michael Pham from Denmark who&#8217;s put it together (perhaps even more remarkably) in Delphi. phpDesigner has lots of productivity tools designed to make coding more efficient, it incorporates tools for editing related technologies such as HTML, CSS and JavaScript and is one of the few tools that, through its excellent syntax tools, built in manuals and code snippets, helps newcomers to learn PHP.</p>
<p>And perhaps the best news is the price (less than forty quid including VAT). There&#8217;s a trial version available at <a title="MP Software's website" href="http://www.mpsoftware.dk" target="_blank">http://www.mpsoftware.dk</a> and the product is being actively developed with a beta version currently downloadable for all registered users.</p>
<p>It&#8217;s not often that I come across a piece of software that blows me away with its quality and value. I&#8217;ve been struggling with Zend&#8217;s reasonably featured but unresponsive products and had switched to the (also excellent) Ultraedit but phpDesigner looks like being my IDE of choice, at least for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2008/06/04/phpdesigner-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chartdirector</title>
		<link>http://www.scribbleit.co.uk/blog/2008/04/14/chartdirector/</link>
		<comments>http://www.scribbleit.co.uk/blog/2008/04/14/chartdirector/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 18:12:45 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[charts php]]></category>
		<category><![CDATA[graphs php]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=114</guid>
		<description><![CDATA[Chart Director is the tool I&#8217;ve used for the past year or so for displaying charts and graphs. It can be a little fiddly to get to grips with but the documentation is extensive and you can usually get started by adapting an example. Shown here is a Radar Chart I&#8217;ve used for my latest [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.scribbleit.co.uk/blog/wp-content/uploads/2008/04/radar.png"><img class="alignnone size-medium wp-image-113" title="radar" src="http://www.scribbleit.co.uk/blog/wp-content/uploads/2008/04/radar-300x204.png" alt="Radar Chart" width="300" height="204" /></a><br />
<a href="http://www.advsofteng.com/">Chart Director</a> is the tool I&#8217;ve used for the past year or so for displaying charts and graphs. It can be a little fiddly to get to grips with but the documentation is extensive and you can usually get started by adapting an example. Shown here is a Radar Chart I&#8217;ve used for my latest project: it allows for two sets of 6 data points, all scored between 1 and 9 to be overlaid on each other to show differences.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2008/04/14/chartdirector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stripping HTML tags using PHP</title>
		<link>http://www.scribbleit.co.uk/blog/2008/03/26/stripping-html-tags-using-php/</link>
		<comments>http://www.scribbleit.co.uk/blog/2008/03/26/stripping-html-tags-using-php/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 16:35:21 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=105</guid>
		<description><![CDATA[If you create registration forms and the like, you&#8217;ll often need to make sure that HTML tags are removed from anything your user types in just in case they&#8217;re attempting to be naughty. What&#8217;s needed is a simple way to iterate through all the POSTed values and strip these tags out. It would be even [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>If you create registration forms and the like, you&#8217;ll often need to make sure that HTML tags are removed from anything your user types in just in case they&#8217;re attempting to be naughty.</p>
<p>What&#8217;s needed is a simple way to iterate through all the POSTed values and strip these tags out. It would be even better if some tags (such as &lt;b&gt;) were allowed.</p>
<p>Here&#8217;s how to do it:</p>
<blockquote><p>foreach($_POST as $key=&gt;$value)<br />
{<br />
$_POST[$key]=strip_tags($value,&#8221;&lt;strong&gt;&lt;b&gt;&lt;i&gt;&lt;br&gt;&#8221;);<br />
}</p></blockquote>
<p>The specific function is called<strong> strip_tags</strong> and it takes two values. The first is the string to be stripped and the second is a list of allowable html tags. I&#8217;m using the <strong>foreach</strong> construct to iterate through the POSTed variables and pulling out the <strong>key</strong> for each array element along with its associated contents. These are then stripped of HTML and then the key value is used to replace the existing array element with the stripped one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2008/03/26/stripping-html-tags-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Crash Course</title>
		<link>http://www.scribbleit.co.uk/blog/2008/03/04/mysql-crash-course/</link>
		<comments>http://www.scribbleit.co.uk/blog/2008/03/04/mysql-crash-course/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 13:55:30 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=98</guid>
		<description><![CDATA[Short and sweet, just like this review, if you want to learn MySQL you need &#8220;MySQL Crash Course&#8221; by Ben Forta. A little gem. Its ISBN is 0-672-32712-0 or click the image to order.]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.amazon.co.uk/gp/product/0672327120?ie=UTF8&amp;tag=nlightnmultimedi&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0672327120" target="_blank" title="MySQL Crash Course"><img src="http://www.scribbleit.co.uk/blog/wp-content/uploads/2008/03/mysql.jpg" alt="MySQL Crash Course" /></a>Short and sweet, just like this review, if you want to learn MySQL you need &#8220;MySQL Crash Course&#8221; by Ben Forta. A little gem. Its ISBN is <span></span><span class="b">0-672-32712-0 or click the image to order. </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2008/03/04/mysql-crash-course/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
