如何使用两个div标签制作回显表? [英] How to make echo table with two div tag?

查看:113
本文介绍了如何使用两个div标签制作回显表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用div创建回显?如果我需要回声,表格不起作用。

How to make echo for table with div ? Table do not work if I need to do echo.

我的建议有回声(不工作):

My proposal with echo (not work):

<?php
    echo "<div class="container">
        <div class="main">
           <h2>User info</h2><hr/>
                <form id="form1" name="form1" method="post" action="input_form_02_qA_01.php">
                    <label>Name:<span>*</span></label><br />
                    <input type="text" name="nick" id="nick" placeholder="" required/>
                    <label>Email address:
                    <input type="text" name="email" id="email" placeholder="" required/>
                    </label>
                    <br/>
                    <label>Age:<span>*</span></label><br />
                    <input type="number" name="age" id="age" required/>
                    <label>Sex:<span>*</span></label><br />
                    <input type="radio" name="sex" value="man" required>Man
                    <input type="radio" name="sex" value="woman" required>Woman
                    <p>
                    <label>
                    <input type="submit" name="submit" id="Submit" value="Go to page 2" />
                    </label>
                </form>
        </div>
    </div>";
 ?>


推荐答案

只需将echo改为echo并最后改为; to;
?>
下面的代码将起作用

Just change the echo " to echo ' and at last "; to '; ?> Below code will work

<?php
echo '<div class="container">
    <div class="main">
       <h2>User info</h2><hr/>
            <form id="form1" name="form1" method="post" action="input_form_02_qA_01.php">
                <label>Name:<span>*</span></label><br />
                <input type="text" name="nick" id="nick" placeholder="" required/>
                <label>Email address:
                <input type="text" name="email" id="email" placeholder="" required/>
                </label>
                <br/>
                <label>Age:<span>*</span></label><br />
                <input type="number" name="age" id="age" required/>
                <label>Sex:<span>*</span></label><br />
                <input type="radio" name="sex" value="man" required>Man
                <input type="radio" name="sex" value="woman" required>Woman
                <p>
                <label>
                <input type="submit" name="submit" id="Submit" value="Go to page 2" />
                </label>
            </form>
    </div>
</div>';
?>

这篇关于如何使用两个div标签制作回显表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆