Home > Backend Development > PHP Tutorial > php惯用前端语法整理收集

php惯用前端语法整理收集

WBOY
Release: 2016-06-13 12:28:48
Original
822 people have browsed it

php常用前端语法整理收集

以下为前端常用php语法:

?

// 定义变量<!--{eval $colSize = sizeof($navlist);}--><!--{eval $vip_level_points = array(0, 10000, 20000, 35000, 50000, 75000);}-->//数组<!--{eval $cur_level = $_G[viplevel];}-->// 输入变量$colSize<!--{eval echo $cur_level + 2;}--><!--{eval echo $cur_level < 7 ? 'vip-gray' : '';}-->// 三目运算<!--{eval $level_diff_point += ($cur_level == $highest_level - 1 ? 28 : 0);}-->// 获取数组长度<!--{eval $colSize = sizeof($navlist);}-->or<!--{eval $colSize = count($navlist);}-->// 数据循环<!--{loop $navlist $item}-->      <div class="text-color-6e6 title-text">{$item['desc']}</div><!--{/loop}-->// 逻辑判断if else if<!--{if $_GET['from']=="mobileapp"}--><h1>手机访问</h1><!--{else}--><h1>非手机访问</h1><!--{/if}-->// js获取php变量url = '$_config_dianrong["login"]["h5"]';onclick="redirectLink('{$_config_dianrong['forum']}/index1.html')"
Copy after login

?

?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template