- Html environment:
<tag attribute="<?php echo PhpFunction($foo); ?>">
Some text <?php echo OtherPhpFunction($pippo); ?>.
<div>Now is <?php echo Time(); ?>, hello <?php echo $fooName; ?>.</div>
- Php environment:
echo '<tag attribute="'.PhpFunction($foo).'">';
echo 'Some text '.OtherPhpFunction($pippo).'.';
echo '<div>Now is '.Time().', hello '.$fooName.'.</div>';
Re-formulated better: suppose we have a pure html file, but saved in php format. Then, the php engine must (1) read it (analyze it), and then (2) virtually print it (send it to the client).
So, i could think it's quicker to work in pure php giving directly the command "echo" applyed on all the html content (for example an "echo" line by line); in this way only the second phase (sending the virtual page to the client) will be executed.
There are 8 replies in this thread, which are not being displayed. Browsing this forum thread replies is available only to premium subscribers.
Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.