最佳答案
I work a lot in mixed HTML and PHP and most time I just want solid HTML with a few PHP variables in it so my code look like this:
<tr><td> <input type="hidden" name="type" value="<?php echo $var; ?>" ></td></tr>
Which is quite ugly. Isn't there something shorter, more like the following?
<tr><td> <input type="hidden" name="type" value="$$var" ></td></tr>
This is possible to but you get stuck with the ""
(you have to replace them all with ''
) and the layout is gone
echo "<tr><td> <input type="hidden" name="type" value="$var" ></td></tr>"
Is there anything better?