setRoot('templates'); echo "

Single value

"; echo "

Test with __single

"; // set name of template file $result = $template->readTemplatesFromFile('bug152.tmpl'); $template->addVar('cond-with-single', 'MYVAR', 'MYVALUE'); // parse and display the template $template->displayParsedTemplate('cond-with-single'); echo "

Test without __single

"; $template->addVar('cond-without-single', 'MYVAR', 'MYVALUE'); // parse and display the template $template->displayParsedTemplate('cond-without-single'); echo "

Single value

"; echo "

Test with __single

"; $template->addVar('cond-with-single', 'MYVAR', array('one', 'two', 'three')); // parse and display the template $template->displayParsedTemplate('cond-with-single'); echo "

Test without __single

"; $template->addVar('cond-without-single', 'MYVAR', array('one', 'two', 'three')); // parse and display the template $template->displayParsedTemplate('cond-without-single'); ?>