因为是动态生成的数值(-0-9),当我直接用ECHO出来可以正常显示,但是我想将他用INPUT输入到一个表格中,但是数值就变成空的了.
请教大家了.
echo $args..$vars.$coms."<br>"; 可以正常显示
echo '<tr><td ><input value='.$vars.'></td></tr>';只是显示出空白单元格.
我想是不是编码的问题呢?试了几次也找不到解决办法.

解决方案 »

  1.   

    check the page's static source, you will find the you forget this
    <!-- what's the input's type?? -->
    <input value="" /><!-- you should write the code like this -->
    echo '<tr><td><input type=\"text\" value=\"'.$vars.'\"></td></tr>';
      

  2.   

    echo '<tr><td><input type=\"text\" value=\"'.$vars.'\" /></td></tr>';if you still have problems, send mail to me: [email protected]
      

  3.   

    我觉得问题不在这里.有试过不行.
    VARS的TYPE是从服务器中得到的一个值,用户选择后传递到PHP中,然后打印成表格.
    我不明白的是,ECHO $VARS出来的完全正常,只是在INPUT中才不见了.
      

  4.   

    还是没有回复??
    是不是有什么TYPE的值在INPUT中不可以显示呢?
      

  5.   

    echo $args..$vars.$coms."<br/>"; 可以正常显示
    echo '<tr><td ><input value='.$vars.'>'.$vars.'</td></tr>';//这样就有了多看看html中的表单应用
      

  6.   

    不好意思 ,看 成option了<input  value=hello>
    这样的是可以 显示 的建议你直接查看网页的源文件,看看这个value是什么
      

  7.   

    i only get like this 
    parse error, unexpected '.'
    strip it 
    noting wrong!
      

  8.   

    我的代码是这样的:
    echo '<td ><input type="text"  value="'.$vars.'"  style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000" size="10"></td>';
    就是直接用ECHO输入进表单.
      

  9.   

    用var_dump($vars)得到的显示是  STRING(48)"   15" 
    问题出在哪里呢?
      

  10.   

    [?php
    $vars="123";
    echo '<td ><input type="text" value="'.$vars.'" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000" size="10"></td>';
    ?]
    可以得到结果!检查你前面的$vars.
      

  11.   

    VARS是一个动态得到的STRING,当我用ECHO打印出来完全正确.
    不知道是不是编码的问题.