复制代码 代码如下:
$a = array(
'a','b','c'
);
require 'template/demo.php';//引用模板
?>
模板文件:
复制代码 代码如下:
模板测试 =$a[1]?>
1 | <br><?php print_r( $a ); ?> <br><pre class = "brush:php;toolbar:false" > <br> <br> <br> <br><p class = "codetitle" ><span style= "CURSOR: pointer" onclick= "doCopy('code65253')" ><u>复制代码</u></span> 代码如下:</p><p class = "codebody" id= "code65253" > <br><?php foreach ( $a as $value ){ ?> <br>键值: = $value ?><br> <br><?php } ?> <br>
|
Salin selepas log masuk