I'm experiencing problems with this gallery tutorial - the following error message is being displayed:

Error message: Parse error: syntax error, unexpected T_ECHO in /equinefocus.co.uk/photos/2009-03-21/gallery.php on line 87

I've tried altering line 87 but had no success so far. I removed lines 86-88 out of interest, but the error messageindicated a further problem of a similar nature.

Can anyone point me in the right direction?

File with line numbering/code attached.