本文整理汇总了PHP中util::htmlentities方法的典型用法代码示例。如果您正苦于以下问题:PHP util::htmlentities方法的具体用法?PHP util::htmlentities怎么用?PHP util::htmlentities使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类util
的用法示例。
在下文中一共展示了util::htmlentities方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
?>
</div>
<div class='ins_cont' style='height:135px'>
<?php
foreach ($labels_variables as $label => $data) {
$help_msgs[$i++] = array(addslashes($data['help']), addslashes($data['sample']));
$class = $i % 2 ? 'odd' : 'even';
?>
<div data-id='<?php
echo $i;
?>
' class='<?php
echo $class;
?>
' ><?php
echo util::htmlentities($label);
?>
</div>
<?php
}
?>
</div>
</td>
</tr>
<tr>
<td class='nobborder center' colspan='2' height='100px'>
<div id="help">
<?php
$config_nt = array('content' => _("Select a language element from the lists to see its meaning. Click on full references in case of need a more detailed description"), 'options' => array('type' => 'nf_info', 'cancel_button' => false), 'style' => 'width: 90%; margin: 25px auto 10px auto; padding: 10px 0px; text-align: left; font-style: italic');
$nt = new Notification('nt_1', $config_nt);
示例2: is_array
echo "</div>";
}
?>
</div>
</div>
<div id="tabs-5">
<div class="accordion">
<?php
$labels_sections = is_array($labels_sections) ? $labels_sections : array();
foreach ($labels_sections as $ins => $label) {
echo "<h3><a href='#'>" . util::htmlentities($ins) . "</a></h3>";
echo "<div>";
//Description
echo "<div class='help_title'>{$title_desc}</div>";
echo "<div class='help_container'>" . $label['help'] . "</div>";
//Example
echo "<div class='help_title'>{$title_example}</div>";
echo "<div class='help_container'>" . $label['sample'] . "</div>";
echo "</div>";
}
?>
</div>
</div>
示例3: test_htmlentities
public function test_htmlentities()
{
$this->assertEquals('One & Two', util::htmlentities('One & Two'));
$this->assertEquals('One & Two', util::htmlentities('One & Two', TRUE));
}