I don't see any PHP errors in the Zend gallery code, and PHP's syntax-checker passes it, and I can't see your code at all; not knowing what "parse errors" you're getting I can't comment on your code, but I can see some problems with the Zend example:
Question 1 of the Newbie's FAQ applies
explode() would be a better choice than split()
"continue;" should be "break;"
In the HTML, there is a kludgy mix of <font> tags and style= attributes (and some attributes aren't quoted).
The placement of the loginform focussing code is poorly chosen.