【发布时间】:2013-04-09 09:02:42
【问题描述】:
有人可以帮我解决这个问题吗?我试图在 php 中使用 isset 作为值来回显输入,但我在使用逗号时遇到了困难。
echo '<td><input class="text" type="text" id="txtLogin" name="txtLogin" value="<?= isset($_POST['"txtLogin"']) ? htmlspecialchars($_POST['"txtLogin"']) : '' ></td>';
谢谢!
【问题讨论】:
-
您不再需要 PHP 脚本的开始标签。
<?=在isset()之前是错误的。=符号表示echo,现在你有:echo "some string<?php echo 'another string'"等等......这是错误的。使用点分隔字符串和 PHP 代码,例如echo 'String '. some_php_stuff() . 'another string';