Relative Content

Tag Archive for phpparsingtemplatesnewlinetemplate-engine

Remove empty lines left after parsing a template

I am working on my own simple templating engine/parser in PHP and currently I’m almost done with implementing conditional blocks (<% if %>content<% endif %>). I have one issue however that I don’t know how to solve. After parsing the template, there are empty new lines left where the conditional blocks were.