'.someclass ul', 'row' => 'li' ); $data = array( array( 'title' => 'News 1 title', 'body' => 'News 1 body', ), array( 'title' => 'News 2 title', 'body' => 'News 2 body', ), array( 'title' => 'News 3', 'body' => 'News 3 body', ), ); // include to fully preserve scope include( plainTemplates::createTemplate( // first the template name // templates included with tag will also be parsed, so stay calm ;) 'demo-js.htm', // second the var info array( // var name in scope '$data', // and var value $data, // finally the selectors (of course there are defaults, that is UL and LI) $selectors ) ) ); ?>