PHP: Removing an item from an array

If you have a php array, but need to nuke an item from it, the unset function is just the tool to do that. When iterating through the array after removing the item, you should be slightly careful.

The unset function does remove the item, but it doesn’t “reindex” the array, so you should traverse the array by index-numbers after removing the item. The issue is probably best illustrated by this example:

PHP4 - Game over

Yesterday PHP 4.4.9 was released, and today PHP 4 is officially dead. There wil be no more updates.

Don’t worry too much tough. PHP 5 is far superior and there’s absolutely no go reason not to have moved on to PHP 5 long ago.

PHP 4 - It was a nice ride and I’m sure you deserve the rest.

A Premium look

Welcome to a fresh look on netfactory.dk. I’ve never been quite satisfied with the old look, and stumbled across the WP_Premium theme which looked quite nice. It’s now live in a lightly hacked version.

Therre are quite a few things I’d like to hack further but in the spirit of the Internet Way of doing things, it’s probably best to release something slightly broken - and let updates happen “when I find the time”(tm).

What is twitter?

One of the hottest sites on the web for more than a year is twitter, but what is Twitter?

  • I’ve tried a few times to explain it, and while it may be a fun task, it has often become quite a mess. This is an attempt to capture the most successful explanation of twitter.

The core of Twitter is a combination of three different characteristics:

  • Twitter is like a blog - An author publish content. It may be personal, it may be themed, it may be interessting - there are no set rules for the contents except those set by the author.
  • Twitter is like an SMS - There are a 140 character limit on each piece of content. If you need more, you need to split contents in several “twits”.
  • Twitter is a network - It’s no just a website. Through build in services and APIs you can connect with twitter through SMS, desktop clients, Instant messaging and many other ways. Besides a technical network, it’s also a social network where you can follow other interesting users, communicate with other users (private or in public).

That’s pretty much the core.

Cookie limits in browsers

How many cookies do you neeed and how many does the browsers support? - It seem to come up all to often, so after a bit of digging in search engines, here are (for my own convenience) the findings of what the limits are on cookies in the currently used browsers.

The cookie standard (RFC2965) specifies a browser should be able to handle at least 20 cookies per domain, but one thing is a standard - who does the real world look?