Jump to content

Recommended Posts

If you can avoid writing your HTML through PHP then I would.  Apache can parse HTML and send it to the browser faster than Apache loading PHP, then PHP's interpreting engine parsing it and sending it to Apache to send to the browser.

 

Client side should stay client side and server side should stay server side.

Okay well good luck with that phpORcaffine, i have no idea how client side should be client side a it applies here!

 

if your file is assoated with php (has a .php extenstion) then its going to be parsed, how you handle the html in that file really depends on what your doing

 

I have found that stepping in and out of PHP is very slightly slower than echoing the data,

for example

<?php
$example1 = "some text";
$example2 = "some text";
$example3 = "some text";
echo "<input type=\"text\" value=\"$example1\"><br />\n";
echo "<input type=\"text\" value=\"$example2\"><br />\n";
echo "<input type=\"text\" value=\"$example3\"><br />\n";
?>

 

is quicker than

<?php
$example1 = "some text";
$example2 = "some text";
$example3 = "some text";
?>
<input type="text" value="<?php echo $example1; ?>"><br />
<input type="text" value="<?php echo $example2; ?>"><br />
<input type="text" value="<?php echo $example3; ?>"><br />

 

BUT

 

tons of html
<?php echo "hello word";?>
tons of html

would be quicker than echoing the 2xtons

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.