Talk

Difference between revisions of "PHP essentials"

From Joomla! Documentation

(New page: It's actually *not* recommended that you start PHP code by "<?php" and end with a "?>" tag. If you are embedding PHP code within HTML markup, you do need to use the closing tag or the file...)
 
(signed my comment)
Line 1: Line 1:
 
It's actually *not* recommended that you start PHP code by "<?php" and end with a "?>" tag. If you are embedding PHP code within HTML markup, you do need to use the closing tag or the file will not parse correctly. However, if the file ends with PHP code instead of HTML markup, it is actually preferred to leave off the final "?>"
 
It's actually *not* recommended that you start PHP code by "<?php" and end with a "?>" tag. If you are embedding PHP code within HTML markup, you do need to use the closing tag or the file will not parse correctly. However, if the file ends with PHP code instead of HTML markup, it is actually preferred to leave off the final "?>"
  
I would change that to read "When embedding PHP code within HTML markup, use <?php to start your code and ?> to close it"
+
I would change that to read "When embedding PHP code within HTML markup, use <?php to start your code and ?> to close it" -jlleblanc

Revision as of 13:24, 28 July 2009

It's actually *not* recommended that you start PHP code by "<?php" and end with a "?>" tag. If you are embedding PHP code within HTML markup, you do need to use the closing tag or the file will not parse correctly. However, if the file ends with PHP code instead of HTML markup, it is actually preferred to leave off the final "?>"

I would change that to read "When embedding PHP code within HTML markup, use <?php to start your code and ?> to close it" -jlleblanc