|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-11-15 19:06 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
When assigning a string that contains a "replacement variable"-like sub-string to an actual replacement variable, on IT's next "pass" it will replace the variable-like sub-string with nothing and if this string was contained within a block it will remove the block: Example Lets assume for some unknown reason the programmer wishes to print name like this -> {name} <code> <?php require_once("HTML/IT.php"); $vars["title"] = "Welcome! {Adam}"; $vars["content"] = "This is some content!"; $template = " <!-- BEGIN TITLE --> {title}<br /> <!-- END TITLE --> <!-- BEGIN CONTENT --> {content}<br /> <!-- END CONTENT -->"; $tpl = new HTML_Template_IT; $tpl->setTemplate($template, TRUE, TRUE); $tpl->setVariable($vars); echo $tpl->get(); ?> </code> When the above template and data is processed by IT it will not print the name contained in the string $vars["title"]. I hope this is enough info to figure out what's up :) Adam