If I'm inside a ton of PHP code, instead of exiting PHP, I usually write code that contains these variables:
echo "This is how I use a ".$variable." inside a string";
but is it more efficient to exit PHP like this:
?>
Should I instead use the <? echo $variable; ?> like this
<?
There will be many instances of code throughout the page like this, as I fill the pages with dynamic content or is this too much of a generalization?
source
share