Parse string as a query string

There has been an odd occasion in the past where I have used a string (Note: not the query string) in order to form a settings class in some way or another. I didn’t realise that there was a built in PHP function for this, and is only through reading through most of the PHP string functions that I came across it (and many other interesting functions).

The times of doing this are long gone (Am using the query string here just for clarity):

  1. <?php
  2. foreach (explode('&'$_SERVER['QUERY_STRING']) as $chunk) {
  3.     $chunk explode('='$chunk);
  4.     $variables[$chunk[0]] = $chunk[1];
  5. }

And I am now saying “hello” to this:

  1. <?php
  2. $variables parse_str($_SERVER['QUERY_STRING']);

Read more… | 1 comments


SimpleXML

One thing I have found is the lack of really simple XML classes—that’s not to say there aren’t any good ones out there, I have used several really cracking ones. For my new version of my personal site (yes, this site is planned for a revamp) I wanted to integrate my Twitter feed somewhere. I looked and looked for a really simple XML class but was unable to find one. So I made one. And here is the result:

Read more… | 2 comments


Safari: the hidden developer tools

I’m a developer. A such I require tools to help me, such as Web developer and Firebug. However, Firefox has become so unstable for me that I have been forced over to Safari. There are a lot of things I miss from Firefox:

  • Cmd+Shift+T to reopen the last closed tabs
  • Cmd+U view source.
  • The “Add bookmark here” extension.
  • Web developer
  • Firebug
  • Right clicking on an image > properties.
  • Saving form credentials, and providing it in an easy to use place (No, I don’t count Keychain as an easy to use place).

Read more… | 4 comments


Dictionary.app quick tip

Dictionary.app

One of the reasons I love OS X is that everything is thought out. One quick example of this is something I learnt a couple of months ago on one of my very infrequent visits to Digg, in any Cocoa or Carbon application, hover your cursor over a word and hit Command+Control+D.

Voila!

Instant access to Dictionary.app without opening it, presented in a very user friendly way, with links to see other information such as from a Thesaurus or Wikipedia.

Read more… | 0 comments


Huzzah: new news

The BBC has finally rolled out its new news site, months after it updated its main homepage. And I like it, except there are a lot of points which I don’t.

Read more… | 1 comments


Want me to talk about something in particular? Drop me a line and I may just do that.

Recent articles

Other topics I ramble on about