Home > Backend Development > PHP Tutorial > 在PHP中怎么插入HTML代码块

在PHP中怎么插入HTML代码块

WBOY
Release: 2016-06-13 10:25:36
Original
1159 people have browsed it

在PHP中如何插入HTML代码块
我用PHP从mysql中查询记录然后想把不同字段显示在表单中的不同的text中,并且可以更新数据。
想插入一个比较复杂的表单,用echo太容易出错,各位大神,有没有其他办法可以实现啊,跪求!

------解决方案--------------------
晕。。我又把简单问题复杂化了。。输出大段html代码可以这样做:

PHP code
$ar = array('demo' => '111', 'test' => '222');$html =         <input type="text" value="{$ar['demo']}"><br>        <input type="text" value="{$ar['test']}"><br>    HTML;echo $html;<div class="clear">
                 
              
              
        
            </div>
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