It's Friday!

I have a lot of work to get done today. Discovered that I’ve missed a whole section of work on a microsite due to the project scope not being very explicit :( Deadline is today (of course) but shouldn’t be too hard. The biggest problem is that the spec I wanted to get written today will probably slip into Monday.

I’ve also been told by Len (our MD) that the offer for Ross will go out today.

Do You Trust Tony?

I was listening to the Today program on Radio4 this morning and there was a report about the first dossier produced by the Government about the Weapons of Mass Destruction that Iraq was purported to have. Just to be clear, this dossier was before the 1441 resolution and wasn’t the later one that the Government just copied from the Internet.

In the dossier, which was presented to the recalled House of Commons, Tony stated that Saddam had weapons that could be used within 45 minutes of the order to use them being given. Obviously that sort of information focussed MPs minds, especially when Jack Straw pointed out that our troops based in Cyprus are within the range of an Iraqi Scud missile…

However, it appears that that particular piece of information was from a single source that the security services didn’t completely trust and thought might be unreliable. The first version of the dossier didn’t include this information, but according to the BBC’s source was added at the request of Government to make the report more lively.

The official response has been to deny any interference from Government and that all the information in the dossier came from the security services. Personally, I don’t like the idea that the Government published information that the security services didn’t trust without any qualifications attached to it and presented it as fact. Especially information that seems so blatently wrong. It smacks of Propaganda to me, not a “Security Assessment”.

Sorting PHP Arrays

The links section of my blog is generated from a php array because I’m too lazy to sort the list myself.

The current code is:

<?php
$links = array(
"Pewari's Prattle" =>"http://pewari.may.be"
,"Mitchell's LiveJournal" =>"http://www.livejournal.com/users/mjquinn"
,"Wintermute's Journal" =>"http://www.livejournal.com/users/wmute/"
,"Glazblog" =>"http://daniel.glazman.free.fr/weblog/"
,"Adot's notblog*" =>"http://www.mozillazine.org/weblogs/asa/"
,"Brinx" =>"http://www.brinx.org/"
,"famousamy" =>"http://famousamy.livejournal.com/"
,"sjd blog" => "http://www.stephsjournal.says.it/"
);

ksort ($links);

foreach($links as $title => $url)
{
echo "<a class='menu' href='$url' target='_blank'>$title</a>";
}
?>

i.e. it’s really simple. I just use the ksort() function to do the sort.

Question: how do I get it to do a case-insensitive sort without resorting to doing most of the work myself?

The question may become moot, as I’m considering converting it to a database system so that I can edit them using a simple on-line form rather than editing a file :)

Update

Of course, having linked to the function call in the manual, I started having a hunt around as it’s more fun that actually working!

The answer is to use the SORT_NUMERIC flag, which when I think about it, it pretty obvious… *sigh*

So, the correct call is

ksort($links, SORT_NUMERIC);

So I can now correct the title of famousamy‘s link :)

Update 2

Okay, I’m being dense; it’s still not working :)

So the original question still stands!

Addicted?

I may well soon be addicted to Twixels. Unfortunately, I can’t find a good link to them, but they are basically like Cadbury’s “Fingers” biscuits only they are mini-“Twix”s :)

Let's talk about …

the weather! It’s a typically British topic, so I thought I’d mention that it’s a Bank Holiday Monday today and it’s sunny! Well, I say “sunny” when I really mean that there are more breaks in the clouds than normal. It’s great! We’ve put up Jon’s play tent in the back garden and he’s had a whale of a time playing.

We need more warm days…