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?
<?php echo "var{$var}\r\n";?>versus<?php echo 'var{$var}\r\n';?>hence it would save some overhead if you have an intensive amount of processing to load a page (at least 1,000's). I expect for the purpose of this post it makes next to no difference