I've tried various php sidebar widget plugins (exec-php, Samsarin PHP etc) and none of them seem to want to execute the PHP code.
I've had these plugins working, with the code I want to use, on a copy of my wordpress site on a different server.
I've checked the php code on it's own in Safari and Firefox and it works fine.
Any ideas?