Ask a simple PHP question. About the dynamic content of the page! & Lt; div & nbsp; & gt; & lt; h2 & gt; & lt; a & nbsp; href & nbsp; index. php? Cproject & amp; adetail & amp; & gt; here we need to dynamically set & lt; a & gt; & lt; h2 & gt; & lt; div & nbsp ask a simple PHP question. About the dynamic content of the page!
Dynamic settings are required here
Dynamic settings are required here
Dynamic settings are required here
Dynamic settings are required here
Dynamic settings are required here
Dynamic settings are required here
Dynamic settings are required here
In the above section, the data obtained from the database needs to be recycled N times. Replace "dynamic settings here" with the value in the database.
How can I use PHP?
Include this section in Is html output with echo?
I think there should be a better way.
Please take care of the first time you use PHP.
------ Solution ----------------------
You can use the template engine.
------ Solution ----------------------
There is no better way to output html with echo.
------ Solution ----------------------
Smarty
------ Solution ----------------------
$data = array(
array('a'=>'1','b'=>'2','c'=>'3','d'=>'4','e'=>'5','f'=>'6'),
array('a'=>'a','b'=>'b','c'=>'c','d'=>'d','e'=>'e','f'=>'f'),
);
for($i=0,$len=count($data);$i<$len;$i++){
?>
>
>
}
?>
------ Solution ----------------------
Http://bbs.csdn.net/topics/391013945
Just now, a buddy's post directly took away more than the gourd pictorial. the specific details are Baidu.
------ Solution ----------------------
$ Str_1 = 'first dynamic ';
$ Str_2 = 'first dynamic ';
$ Str_3 = 'first dynamic ';
$ Str_4 = 'first dynamic
$ Url = 'id of the url ';
?>
>
>
Dynamic settings are required here
Dynamic settings are required here
Dynamic settings are required here
Dynamic settings are required here