Solved the problem! When editing the class/template file I downloaded it locally and did the coding in DreamWeaver. Windows put in its own linebreaks thus messing up everything. The quick solution was: str_replace("\r\n","\n",...) Jochen