本文整理汇总了PHP中XTemplate::SetNullString方法的典型用法代码示例。如果您正苦于以下问题:PHP XTemplate::SetNullString方法的具体用法?PHP XTemplate::SetNullString怎么用?PHP XTemplate::SetNullString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XTemplate
的用法示例。
在下文中一共展示了XTemplate::SetNullString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: XTemplate
<?php
/*
example 5
demonstrates nullstrings
*/
require "xtpl.p";
$xtpl = new XTemplate("ex5.xtpl");
$xtpl->assign(INTRO_TEXT, "by default, if some variables weren't assigned a value, they simply disappear from the parsed html:");
$xtpl->parse("main.form");
$xtpl->assign(INTRO_TEXT, "ok, now let's assign a nullstring:");
$xtpl->SetNullString("value not specified!");
$xtpl->parse("main.form");
$xtpl->assign(INTRO_TEXT, "custom nullstring for a specific variable and default nullstring mixed:");
$xtpl->SetNullString("no value..");
$xtpl->SetNullString("no email specified!", EMAIL);
$xtpl->parse("main.form");
$xtpl->assign(INTRO_TEXT, "custom nullstring for every variable:) .. you should get it by now. :P");
$xtpl->SetNullString("no email specified", EMAIL);
$xtpl->SetNullString("no name specified", FULLNAME);
$xtpl->SetNullString("no income?", INCOME);
$xtpl->parse("main.form");
$xtpl->parse("main");
$xtpl->out("main");
/*
Revision 1.1 2004/05/27 05:30:47 sugarjacob
Moving project to SourceForge.
Revision 1.1 2004/05/19 01:48:20 sugarcrm
Adding files with binary option as appropriate.