$html=<<<html
<div>A:<input type="text" maxlength="40" size="8" name=option$i."1" value='$option1'/>(answer)</div><br/><br/>
html;
echo $html;
$i is a variable. For example, when $i=5, the value of name should be "option51".
So the HTML code should be
<div>A:<input type="text" maxlength="40" size="8" name="option51" value='$option1'/>(answer)</div><br/><br/>
How to write the code?
<?php
$name = 'option'.$i.'1';
echo "<div>A:
<input type='text' maxlength='40' size='8' name=$name value='$option1'/>
(answer)
</div><br/><br/>";
?>