PHP表单输入类型="text"为特定字段回显下面的标签


php form input type="text" echo label below for specific field

php表单,通过模块自动生成。我希望能够把"标签"/消息下面一个特定的文本框(即字段3:只有名字)。有多个文本字段

Child's name:
<input type="text" value="" name="field3" size="30"> 
Last name:
<input type="text" value="" name="field7" size="30">
Php

<?php 
} elseif ($field['type'] == 'textarea') { 
?>
<textarea name="<?php echo $key; ?>" style="width: 70%; height: 100px">
<?php 
echo ${$key};
?>
</textarea>

如果它只针对一个特定的项目,你会想要添加…

<?php 
echo($key == "field3" ? "Your phrase for firstname here" : "");
?>