Copy code The code is as follows:
$a = array(
'a','b ','c'
);
require 'template/demo.php';//Reference template
?>
Template file:
Copy code The code is as follows:
< head>
Template Test
=$a[1]?>
Copy code Code As follows:
Key value: =$value?>
//Iteration of array
//smarty:
{foreach item=na from=$a key=key}
Key value: {$key}
{/foreach}
//Which one is better understood by PHP programmers?
//smarty also uses regular expressions to parse templates. PHP’s regular expressions are not that efficient...
http://www.bkjia.com/PHPjc/325311.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/325311.htmlTechArticleCopy the code as follows: ?php $a = array( 'a','b','c' ) ; require 'template/demo.php';//Reference template? Template file: Copy the code as follows: !DOCTYPE html html lang="zh" head...