<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>roxxor blog</title>
	<link>http://www.roxxor.co.uk/blog</link>
	<description>technology riffage</description>
	<pubDate>Fri, 05 Oct 2007 10:38:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>Wrapping text in FPDF table cells</title>
		<link>http://www.roxxor.co.uk/blog/2007/10/05/wrapping-text-in-fpdf-table-cells/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/10/05/wrapping-text-in-fpdf-table-cells/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 10:37:09 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/10/05/wrapping-text-in-fpdf-table-cells/</guid>
		<description><![CDATA[This article aims to help those who like myself wondered how to make text wrap within a table cell using FPDF to generate a the PDF. A few posts around the web seem to have missed the point that wrapping comes out of the box in FPDF using the MultiCell function. However, it&#8217;s just a [...]]]></description>
			<content:encoded><![CDATA[<p>This article aims to help those who like myself wondered how to make text wrap within a table cell using FPDF to generate a the PDF. A few posts around the web seem to have missed the point that wrapping comes out of the box in FPDF using the MultiCell function. However, it&#8217;s just a tiny bit tricky but not prohibitively so. So, this is what we are aiming for - an invoice.</p>
<p><img src="http://www.roxxor.co.uk/blog/wp-content/uploads/2007/10/invoice.gif" alt="FPDF Invoice" /></p>
<p>There are 2 examples of wrapping here. Firstly the client address is wrapped, and secondly the first row of the line item data has a wrapped description.</p>
<p><a href="http://www.roxxor.co.uk/repository/demos/fpdf/" target="_blank">View the PDF here</a></p>
<p>In both cases the MultiCell in-built function is used. Before I had this solution working I was using the Cell function. In that case, long text simply continued through to the next cell &#8216;Quantity&#8217;. In the case of Cell, you can simply output a series of calls to the function with a cell width and so fourth and the cells will line up against each other on the same line.</p>
<p>When I switched to MultiCell for the first cell of each row only, I found that it would cause all subsequent cells in the same row to wrap to the next line. Therefore my solution was to use the SetXY function to reposition the &#8216;cursor&#8217; back to where the 2nd cell of the current row would normally be, and then proceed to use Cell calls.</p>
<p>In order to do that it&#8217;s a case of marking the current X and Y coordinates of the cursor prior to entering the line item loop and calling SetXY just after the 1st cell MultiCell function call. That solved the line wrapping issue and my text wrapped inside the first cell - great.</p>
<p>The second issue however is that the MultiCell is arbitrarily high depending on the amount of text wrapping going on. I had been provided a static height to my Cell calls as as such they were now out of line with the first column, that is, the text and border lines were all out of sync with the 1st column.</p>
<p>To solve that problem it was a case of grabbing the Y coordinate of the cursor before and immediately after the MultiCell call, finding the difference to ascertain the height of the cell, and then using this to size the height of the remaining Cell calls on the row.</p>
<p><strong>Source Code</strong></p>
<p>Please feel free to <a href="http://www.roxxor.co.uk/repository/demos/fpdf/InvoicePDF.zip">download the source code for this article</a> which builds the invoice PDF as described.</p>
<p>The source code is provided as a ZIP file with <strong>index.php</strong> and <strong>InvoicePDF.class.php</strong>. You will need to <a href="http://www.fpdf.org/" target="_blank">obtain the FPDF library</a> yourself and modify the <strong>index.php</strong> include file locations.</p>
<p>Best of luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/10/05/wrapping-text-in-fpdf-table-cells/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A rare chance to talk to Microsoft</title>
		<link>http://www.roxxor.co.uk/blog/2007/10/05/a-rare-chance-to-talk-to-microsoft/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/10/05/a-rare-chance-to-talk-to-microsoft/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 08:55:46 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
		
		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/10/05/a-rare-chance-to-talk-to-microsoft/</guid>
		<description><![CDATA[It&#8217;s not often you will get the chance to be heard by some of the leaders of Microsoft services such as Live.com, Office Live, XBOX Live, Hotmail and more, but that chance is being offered by Major Nelson, XBOX Live Community Chap Extraordinaire on his blog.
He&#8217;ll be attending a 2 day meeting with said leaders and [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not often you will get the chance to be heard by some of the leaders of Microsoft services such as Live.com, Office Live, XBOX Live, Hotmail and more, but that chance is being offered by Major Nelson, XBOX Live Community Chap Extraordinaire on his blog.</p>
<p>He&#8217;ll be attending a 2 day meeting with said leaders and will try and share feedback from the world as we know it on what it thinks of Microsoft services, what they do well, what they can do better.</p>
<p>If you feel like sharing your opinions, and I urge you to do so, <a href="http://www.majornelson.com/archive/2007/10/04/What-would-you-say-to-leaders-of-services-at-Microsoft.aspx">head over to Major Nelson </a>and get posting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/10/05/a-rare-chance-to-talk-to-microsoft/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Moo - a simple idea done fantastically well</title>
		<link>http://www.roxxor.co.uk/blog/2007/09/07/moo-a-simple-idea-done-fantastically-well/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/09/07/moo-a-simple-idea-done-fantastically-well/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 08:55:42 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
		
		<category><![CDATA[Review]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/09/07/moo-a-simple-idea-done-fantastically-well/</guid>
		<description><![CDATA[Today is very exciting for me (as well as others - National Defence Day in Pakistan, Independence Day in Brazil and Victory Day in Mozambique). But I&#8217;m excited because I received my Moo minicards - my roxxor business cards.
Moo is an online printing company that produce a small set of quality eco-friendly products such as [...]]]></description>
			<content:encoded><![CDATA[<p>Today is very exciting for me (as well as others - National Defence Day in Pakistan, Independence Day in Brazil and Victory Day in Mozambique). But I&#8217;m excited because I received my <a href="http://www.moo.com" title="Moo" target="_blank">Moo</a> minicards - my roxxor business cards.</p>
<p>Moo is an online printing company that produce a small set of quality eco-friendly products such as minicards, stickerbooks and notecards, and for a great price and fast global delivery.</p>
<p style="text-align: center"><img src="http://www.roxxor.co.uk/blog/wp-content/uploads/2007/09/moo_1.jpg" alt="Moo Minicards Box" /></p>
<p>The great thing about Moo is that you can upload your photos or (the bit that I like) brilliantly get it to import photos out of your favourite  image-related accounts that you may have around the web such as Flickr, Bebo, VOX and more. Or, if you don&#8217;t have any images, they have some stuff for you to choose from. They don&#8217;t yet do full photo albums but I really hope they do in future.</p>
<p>We decided at roxxor to use Moo Minicards for our business cards. A business card says a lot about the person or company giving it and we felt we wanted to (as Ben likes to say) &#8220;eat our own dog food&#8221; and demonstrate our awareness and support of excellent web businesses.</p>
<p style="text-align: center" align="left"><img src="http://www.roxxor.co.uk/blog/wp-content/uploads/2007/09/moo_3.jpg" alt="My Moo Minicard Front" /></p>
<p>Moo provides an online editor for entering the information for your card and placing imagery if you are customising it yourself. We chose to download the Photoshop templates for ours but you need not. When you&#8217;re happy, you submit your design, pay a good price and just 3 days later you get an exciting little box packed full of cards. Simplicity.</p>
<p>The first thing you&#8217;ll notice is their size. This size was typical of &#8220;calling cards&#8221; back in the day, and are 1/2 the size of a normal business card. Most of the time normal business cards do not use that space and if they do look over-crowded and ugly. The material is best described as a satin finish - that is, not glossy and not matte but just a slight sheen. The thickness is pleasingly thick and together with their size makes bending only possible in one direction.</p>
<p style="text-align: center"><img src="http://www.roxxor.co.uk/blog/wp-content/uploads/2007/09/moo_2.jpg" alt="My Moo Minicard" /></p>
<p>We chose to make an impact with our brand on the front side of the card, whilst adding limited contact information to the rear. And yet even with this smaller card, it looks fresh and spacious whilst still providing clear brand and enough information.</p>
<p>We highly recommend <a href="http://www.moo.com" target="_blank">Moo</a> - it&#8217;s one of the more useful companies out there on the web doing a fantastic job of a simple idea - just as business should be.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/09/07/moo-a-simple-idea-done-fantastically-well/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What Browser Version To Design For</title>
		<link>http://www.roxxor.co.uk/blog/2007/08/16/what-browser-version-to-design-for/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/08/16/what-browser-version-to-design-for/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 11:38:19 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[HTML]]></category>

		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/08/16/what-browser-version-to-design-for/</guid>
		<description><![CDATA[We always try to design things so they are cross browser compatible and that things work and look the same for all user no matter what version or operating system they are using.
We encountered a problem recently with a site not rendering correctly in IE6.0 - of course our dev guys fixed this right up [...]]]></description>
			<content:encoded><![CDATA[<p>We always try to design things so they are cross browser compatible and that things work and look the same for all user no matter what version or operating system they are using.</p>
<p>We encountered a problem recently with a site not rendering correctly in IE6.0 - of course our dev guys fixed this right up but this inspired me to get some stats on just what browsers folks were using on our clients web sites. I took a peak at the analytics for this across a range of our clients that have significant traffic volumes (in excess of 1M visit per month) and a varied demographic user base across a range of industry sectors (Fashion, Retail and Transport) to make these stats work as &#8216;real&#8217; averages.</p>
<p>It made interesting reading and I thought you might like to see the results.</p>
<table unselectable="on" border="1" cellpadding="2" cellspacing="0" width="458">
<tr>
<td valign="top" width="98"><strong>ORDER</strong></td>
<td valign="top" width="141"><strong>BROWSER</strong></td>
<td valign="top" width="217"><strong>PERCENTAGE OF TRAFFIC</strong></td>
</tr>
<tr>
<td valign="top" width="98"><strong>1</strong></td>
<td valign="top" width="141"><strong>Internet Explorer</strong></td>
<td valign="top" width="217"><strong>88.58%</strong></td>
</tr>
<tr>
<td valign="top" width="98">a</td>
<td valign="top" width="141">v6.0</td>
<td valign="top" width="217">57.71%</td>
</tr>
<tr>
<td valign="top" width="98">b</td>
<td valign="top" width="141">v7.0</td>
<td valign="top" width="217">41.68%</td>
</tr>
<tr>
<td valign="top" width="98">c</td>
<td valign="top" width="141">v5.5</td>
<td valign="top" width="217">0.37%</td>
</tr>
<tr>
<td valign="top" width="98"><strong>2</strong></td>
<td valign="top" width="141"><strong>Firefox</strong></td>
<td valign="top" width="217"><strong>9.00%</strong></td>
</tr>
<tr>
<td valign="top" width="98">a</td>
<td valign="top" width="141">2.0.0.6</td>
<td valign="top" width="217">37.79%</td>
</tr>
<tr>
<td valign="top" width="98">b</td>
<td valign="top" width="141">2.0.0.5</td>
<td valign="top" width="217">30.91%</td>
</tr>
<tr>
<td valign="top" width="98">c</td>
<td valign="top" width="141">2.0.0.4</td>
<td valign="top" width="217">11.84%</td>
</tr>
<tr>
<td valign="top" width="98">d</td>
<td valign="top" width="141">1.5.0.12</td>
<td valign="top" width="217">7.97%</td>
</tr>
<tr>
<td valign="top" width="98">e</td>
<td valign="top" width="141">1.0.7</td>
<td valign="top" width="217">2.13%</td>
</tr>
<tr>
<td valign="top" width="98"><strong>3</strong></td>
<td valign="top" width="141"><strong>Safari</strong></td>
<td valign="top" width="217"><strong>1.91%</strong></td>
</tr>
<tr>
<td valign="top" width="98"><strong>4</strong></td>
<td valign="top" width="144"><strong>Opera</strong></td>
<td valign="top" width="217"><strong>0.29%</strong></td>
</tr>
<tr>
<td valign="top" width="98"><strong>5</strong></td>
<td valign="top" width="144"><strong>Mozilla</strong></td>
<td valign="top" width="217"><strong>0.08%</strong></td>
</tr>
</table>
<p>Based on this data we have decided to rule out IE5.5 from any design/dev decisions going forwards. Sorry to any of you still using this, but there just aren&#8217;t enough of you out there to warrant the additional tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/08/16/what-browser-version-to-design-for/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ubuntu 7.04 Server, Int 14 Boot Error</title>
		<link>http://www.roxxor.co.uk/blog/2007/08/14/ubuntu-704-server-int-14-boot-error/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/08/14/ubuntu-704-server-int-14-boot-error/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 21:40:34 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[xAMP Stack]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/08/14/ubuntu-704-server-int-14-boot-error/</guid>
		<description><![CDATA[Having heard rave reviews of Ubuntu being a real alternative to Windows, I was keen to test this hypothesis out. I downloaded the latest server edition (7.04) and burned the ISO to a CD.
Installation was fine and completed but booting Ubuntu failed at the very start of the boot process just when &#8220;Starting &#8230;&#8221; is [...]]]></description>
			<content:encoded><![CDATA[<p>Having heard rave reviews of Ubuntu being a real alternative to Windows, I was keen to test this hypothesis out. I downloaded the latest server edition (7.04) and burned the ISO to a CD.</p>
<p>Installation was fine and completed but booting Ubuntu failed at the very start of the boot process just when &#8220;Starting &#8230;&#8221; is shown. The following dump is produced (or similar)</p>
<p>Int 14: CR2 f0000000 err 00000000   EIP c828c384   CS 000000060   flags 00010003<br />
Stack: c007eb0 c83f129b c8371d8c 000000082 c00f7eb9 000f7eb8 00000000 00000000</p>
<p>I&#8217;ve read a great many posts about this issue. Suggestions have been made that</p>
<ul>
<li>It&#8217;s a dual boot issue</li>
<li>It&#8217;s a laptop issue</li>
<li>It&#8217;s a RAID disk issue</li>
<li>It&#8217;s a video card driver issue</li>
<li>It&#8217;s a BIOS issue</li>
<li>It&#8217;s an incompatibility issue with the way the server edition kernel is compiled</li>
</ul>
<p>Suggestions to fix the issue are also broad ranging from updating BIOS firmware to booting into recovery mode and twiddling with core system files.</p>
<p><strong>Conclusion</strong></p>
<p>If you have found this post hoping for a concrete answer then I don&#8217;t have it for you. The problem could be one in the list above or maybe another. Right now, it does not seem Ubuntu has addressed this explicitly despite the number of reports</p>
<p><strong>However,</strong> one suggestion did work for me behind which I&#8217;ll throw my support.</p>
<p>Install the Ubuntu Alternative Desktop 7.04. This is available on the same Ubuntu download page as the server edition. You have to select the Desktop edition and then a checkbox indicating you want the alternative ISO. It weighs in a couple hundred megabytes heavier, but after installation I booted into Ubuntu no problems.</p>
<p>The server features I wanted; Apache, MySQL, PHP, I have added with XAMPP, though you could probably find the relevant packages in the package manager too.</p>
<p>I&#8217;ve been using Ubuntu for about a week now with no problems; wireless, mail, messaging, internet and so far the experience has been good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/08/14/ubuntu-704-server-int-14-boot-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows Live Writer</title>
		<link>http://www.roxxor.co.uk/blog/2007/07/30/windows-live-writer/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/07/30/windows-live-writer/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 09:38:04 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/07/30/windows-live-writer/</guid>
		<description><![CDATA[Always keen to trial new bits of software I came across Windows Live Writer and figured my first Roxxor Blog post was pretty much the perfect opportunity to test it out.
I find the only time I get to do any blogging is during downtime on the train or while waiting for some other kind of [...]]]></description>
			<content:encoded><![CDATA[<p>Always keen to trial new bits of software I came across Windows Live Writer and figured my first Roxxor Blog post was pretty much the perfect opportunity to test it out.</p>
<p>I find the only time I get to do any blogging is during downtime on the train or while waiting for some other kind of public transport.</p>
<p>I am a fan of any bit of kit that lets me work on something - check it and then publish. I love the Adwords Editor for exactly the same reasons.</p>
<p>This seems pretty good so far, very Office like &amp; easy to use - <a target="_blank" href="http://writer.live.com/">check it out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/07/30/windows-live-writer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Populate PHP Object Attributes from Database Column Names Dynamically</title>
		<link>http://www.roxxor.co.uk/blog/2007/07/03/populate-php-object-attributes-from-database-column-names-dynamically/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/07/03/populate-php-object-attributes-from-database-column-names-dynamically/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 20:27:41 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[OOP]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/07/03/populate-php-object-attributes-from-database-column-names-dynamically/</guid>
		<description><![CDATA[If you like coding PHP the OOP way then you will often find yourself in the arduous position of needing to populate your object attributes (member variables) from database row data. And you do this again and again and again, and you find it all rather repetitive, which it is. And you don&#8217;t fancy looking [...]]]></description>
			<content:encoded><![CDATA[<p>If you like coding PHP the OOP way then you will often find yourself in the arduous position of needing to populate your object attributes (member variables) from database row data. And you do this again and again and again, and you find it all rather repetitive, which it is. And you don&#8217;t fancy looking at an object relational mapping solution for now, but promise yourself you will &#8220;Another Time&#8221;.</p>
<p>Here it is;</p>
<div class="codesnip-container" >
<div class="codesnip">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">class</span> MyObject <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"> <span class="kw2">function</span> __construct<span class="br0">&#40;</span><span class="re0">$data</span> = <span class="kw2">NULL</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">  <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$data</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">   <span class="kw1">foreach</span> <span class="br0">&#40;</span><span class="re0">$data</span> <span class="kw1">as</span> <span class="re0">$ak</span> =&gt; <span class="re0">$av</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">    <a href="http://www.php.net/eval"><span class="kw3">eval</span></a><span class="br0">&#40;</span><span class="st0">&#8220;<span class="es0">\$</span>this-&gt;&#8221;</span> . <span class="re0">$this</span>-&gt;<span class="me1">db2Camel</span><span class="br0">&#40;</span><span class="re0">$ak</span><span class="br0">&#41;</span> . <span class="st0">&#8221; = &#8216;{$av}&#8217;;&#8221;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">   <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">  <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"> <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"> </div>
</li>
<li class="li1">
<div class="de1"> <span class="kw2">function</span> db2Camel<span class="br0">&#40;</span><span class="re0">$str</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">  <span class="re0">$str</span> = <a href="http://www.php.net/strtolower"><span class="kw3">strtolower</span></a><span class="br0">&#40;</span><span class="re0">$str</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">  <span class="re0">$parts</span> = <a href="http://www.php.net/explode"><span class="kw3">explode</span></a><span class="br0">&#40;</span><span class="st0">&#8216;_&#8217;</span>, <span class="re0">$str</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">  <span class="kw1">for</span> <span class="br0">&#40;</span><span class="re0">$i</span> = <span class="nu0">0</span>; <span class="re0">$i</span> &lt; <a href="http://www.php.net/count"><span class="kw3">count</span></a><span class="br0">&#40;</span><span class="re0">$parts</span><span class="br0">&#41;</span>; <span class="re0">$i</span>++<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">   <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$i</span> == <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">    <span class="re0">$parts</span><span class="br0">&#91;</span><span class="re0">$i</span><span class="br0">&#93;</span> = <a href="http://www.php.net/strtolower"><span class="kw3">strtolower</span></a><span class="br0">&#40;</span><span class="re0">$parts</span><span class="br0">&#91;</span><span class="re0">$i</span><span class="br0">&#93;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">   <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">    <span class="re0">$parts</span><span class="br0">&#91;</span><span class="re0">$i</span><span class="br0">&#93;</span> = <a href="http://www.php.net/ucfirst"><span class="kw3">ucfirst</span></a><span class="br0">&#40;</span><span class="re0">$parts</span><span class="br0">&#91;</span><span class="re0">$i</span><span class="br0">&#93;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">   <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">  <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">  <span class="kw1">return</span> <a href="http://www.php.net/implode"><span class="kw3">implode</span></a><span class="br0">&#40;</span><span class="st0">&#8221;</span>, <span class="re0">$parts</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"> <span class="br0">&#125;</span> </div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
</ol>
</div>
</div>
<p>This code relies on a number of assumptions. These are, but are probably not limited to;</p>
<ol>
<li>The data parameter to the constructor is an associative array, depicting a row from the database. </li>
<li>That the database column names are lowercase, and separated by underscores, e.g. the_column_name</li>
<li>Your attributes will be in camel casing as governed by the db2Camel function</li>
<li>Your attributes will be public as they do not benefit from an explicit declaration of access scope such as private or protected.</li>
<li>You will access the attributes direct on the object, not through get accessors, e.g. $obj-&gt;theAttribute</li>
<li>A programmer would not know the attributes that an object contained from reading the code, they would need to understand the constructor&#8217;s function and consult the database column names to infer the attribute names.</li>
</ol>
<p>If you are happy with all those assumptions, then this code might just prove quite handy in expediating the process of population of PHP object attributes dynamically from a database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/07/03/populate-php-object-attributes-from-database-column-names-dynamically/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Minepik - DreamBuildPlay XNA Game Competition Entry Submitted</title>
		<link>http://www.roxxor.co.uk/blog/2007/07/03/minepik-dreambuildplay-xna-game-competition-entry-submitted/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/07/03/minepik-dreambuildplay-xna-game-competition-entry-submitted/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 19:43:59 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
		
		<category><![CDATA[Gaming]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.roxxor.co.uk/blog/2007/07/03/minepik-dreambuildplay-xna-game-competition-entry-submitted/</guid>
		<description><![CDATA[Anyone who knows me knows I like gaming, programming, coffee and food. Those first 2 came together recently on July 2nd with the submission of my first XNA game, written in C# therefore, entitled Minepik, which I submitted to the DreamBuildPlay.com competition run by the big M.
I spent hours on Sunday tweaking the game levels [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who knows me knows I like gaming, programming, coffee and food. Those first 2 came together recently on July 2nd with the submission of my first XNA game, written in C# therefore, entitled Minepik, which I submitted to the DreamBuildPlay.com competition run by the big M.</p>
<p>I spent hours on Sunday tweaking the game levels with my girlfriend and hit the sack at 0200am, and just found out today they extended the deadline until July 6th. Arrgggh!</p>
<p>Anyway, if you&#8217;re a fan of Sudoku or any other type of numeric puzzle game, head over to the <a href="http://www.roxxor.co.uk/shed/minepik">Minepik project page</a> in the shed to learn more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/07/03/minepik-dreambuildplay-xna-game-competition-entry-submitted/feed/</wfw:commentRss>
		</item>
		<item>
		<title>XAMPP on Vista</title>
		<link>http://www.roxxor.co.uk/blog/2007/06/26/xampp-on-vista/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/06/26/xampp-on-vista/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 13:32:27 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Windows Vista]]></category>

		<category><![CDATA[xAMP Stack]]></category>

		<guid isPermaLink="false">http://blog.roxxor.co.uk/?p=4</guid>
		<description><![CDATA[Getting XAMPP working on Vista requires 2 things as far as I can see. I tried a fresh 1.6.2 install today but it does not work out of the box. Vista complains only about the Apache web server.
Reading around, I saw developers saying all sorts, such as making copies of the XAMPP folder to ensure Vista had [...]]]></description>
			<content:encoded><![CDATA[<p>Getting XAMPP working on Vista requires 2 things as far as I can see. I tried a fresh 1.6.2 install today but it does not work out of the box. Vista complains only about the Apache web server.</p>
<p>Reading around, I saw developers saying all sorts, such as making copies of the XAMPP folder to ensure Vista had the right permissions, or turning Vista&#8217;s User Access Control mechanism off, or installing services from the command line and so on and fourth.</p>
<p>But amongst all these suggestions, only 2 things need to be done to get XAMPP (1.6.2 anyway) working on Vista.</p>
<p>First, don&#8217;t forget to run setup_xampp.bat in the XAMPP installation folder.</p>
<p>And secondly, you need a file called <strong>msvcp71.dll </strong>to reside in the root XAMPP folder. I copied this from my old XP Windows/system32 folder, but you might need to get it elsewhere.</p>
<p>If you do these 2 things, XAMPP should fire up no problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/06/26/xampp-on-vista/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Handling HTML Entities in XML Passed to Flash Dynamic Text Fields</title>
		<link>http://www.roxxor.co.uk/blog/2007/06/26/handling-html-entities-in-xml-passed-to-flash-dynamic-text-field/</link>
		<comments>http://www.roxxor.co.uk/blog/2007/06/26/handling-html-entities-in-xml-passed-to-flash-dynamic-text-field/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 13:01:54 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.roxxor.co.uk/?p=3</guid>
		<description><![CDATA[Today I had to solve the problem of HTML entities such as &#38;apos; showing their full entity-selves when injected dynamically into dynamic text fields.
The entities originated from an XML input stream fed into the Flash movie.
Quite a few folk out there seem to have developed string search and replace functions, but these are limited by [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to solve the problem of HTML entities such as &amp;apos; showing their full entity-selves when injected dynamically into dynamic text fields.</p>
<p>The entities originated from an XML input stream fed into the Flash movie.</p>
<p>Quite a few folk out there seem to have developed string search and replace functions, but these are limited by the anticipated characters.</p>
<p>I found a much simpler method was just to set the dynamic text field instance&#8217;s .html attribute to true, and then inject the text into the .htmlText rather than the .text attribute. Flash apparantly then displays the characters properly.</p>
<p>And I should add that the dynamic text field in question still has anti-aliasing applied in case any of you are worried that using the html attributes do not support it.</p>
<p>Happy days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roxxor.co.uk/blog/2007/06/26/handling-html-entities-in-xml-passed-to-flash-dynamic-text-field/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
