Posted in 18 September 2012 ¬ 23:07h.John
Something that happens occasionally is that I need to create a function that will specifically output chunks of HTML. A good method is to allow for functions to handle both single strings and arrays. The problem? I don’t like duplicating code. The solution? A quick convention to an array! function arrayish($a) { if (!is_array($a)) $a [...]
Read the rest of this entry »
Posted in 1 June 2010 ¬ 13:47h.John
A little problem came up with some user submitted content on a platform I’m working with. A form allows users to submit content with tinyMCE. If the content is pasted from MS Word, the source is then littered with HTML conditional comments that can have a detrimental effect on the the page that returns it. [...]
Read the rest of this entry »
Posted in 27 March 2010 ¬ 23:00h.John
Plus.net have moved to the new CGI platform after some sort of disaster. As this was coming for almost a year, I’m shocked that the platform still seems in such a shoddy state. This has meant that the site has been misbehaving for a few weeks. Most notably causing random Apache errors. I think that [...]
Read the rest of this entry »
Posted in 4 January 2009 ¬ 21:53h.John
I’ve been working on my first ‘proper’ CodeIgniter project this week. It’s been quite gruelling, as there are some moments where I have definitely sped up my production. But it’s constantly getting hampered by the learning curve. It may be slight, but is frustrating when I hit a wall. One issue that just cam up [...]
Read the rest of this entry »
Posted in 4 January 2009 ¬ 10:51h.John
A neat trick I use in PHP is a toggle variable, usually when I’m creating tables and want to alternate the styles. To use a toggle variable: <code>#Create the variable $toggle=true; #Switch it $toggle=(!$toggle);</code> Simple!
Read the rest of this entry »
Posted in 16 May 2007 ¬ 15:40h.John
John begins a quest for an automatic web-based documentation program that will allow him to make some poorly formatted work look consistent on the web.
Read the rest of this entry »