本文整理汇总了PHP中Fn::wsubstr方法的典型用法代码示例。如果您正苦于以下问题:PHP Fn::wsubstr方法的具体用法?PHP Fn::wsubstr怎么用?PHP Fn::wsubstr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fn
的用法示例。
在下文中一共展示了Fn::wsubstr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
<?php
$greetings = "";
if (0 < date('G') && date('G') < 12) {
$greetings = "上午好,";
} elseif (12 <= date('G') && date('G') < 18) {
$greetings = "下午好,";
} elseif (18 <= date('G') && date('G') < 24) {
$greetings = "晚上好,";
}
$userHeadInfo['greetings'] = $greetings . Fn::wsubstr($this->user['nick_name'], 0, 10);
$userHeadInfo['email_check'] = $this->userInfo['email_check'];
$userHeadInfo['person_id'] = $this->userInfo['person_id'];
if ($this->user['phone_num']) {
$userHeadInfo['phone_check'] = 1;
} else {
$userHeadInfo['phone_check'] = 0;
}
$userHeadInfo['level'] = $userHeadInfo['email_check'] + $userHeadInfo['person_id'] + $userHeadInfo['phone_check'];
$levels = FConfig::item("config.user_level");
$userHeadInfo['level_name'] = $levels[$userHeadInfo['level']];
?>
<div class="g-sd2 sidebar">
<!-- 个人信息 -->
<div class="profile">
<div class="pf-hd">
<img src="<?php
echo FF_DOMAIN;
?>
/upload/images/user_head.png" width="95" height="95" />
</div>
示例2:
$class = "two";
}
$i++;
?>
<li class="f-cb <?php
echo $class;
?>
">
<div class="f-fl">
<div class="info f-fl">
<div><!--<span class="count-profits f-fr">计算收益</span>--><h3 class="f-h3"><a href="#"><?php
echo $v['product']['product_name'];
?>
</a></h3></div>
<div class="desc"><?php
echo Fn::wsubstr($proTypes[$v['product']['product_type_id']]['description'], 0, 65);
?>
</div>
<div class="info-bottom">
<div class="item red">
<div class="f-fl">
<p>预计年化</p>
<p>收益率</p>
</div>
<div>
<span class="rate"><?php
echo $v['product']['yield_rate_year'];
?>
%</span>
</div>
</div>