Web development
Publié le - 1768 vues -

How to mark PHP code in Html Code ?

Now we live in a world in which computing is beginning to take place. Since few years, it has attracted the attention of the majority of people on earth. Indeed, it still uses the internet to our research, our needs and even our small projects. For this reason, many site is created every day and tries increasingly have maximum subscriber to advance it. The solution would be to consult or at least think like these php developers to optimize its market.

Embedding PHP in HTML

To distinguish themselves from others, the use of PHP could be of great help. By using it, it becomes easier to boost your website and run your business. Note, however, that its integration in the HTML code requires a small knowledge base more or less important. This is to change the extension of your file in question * .php or * .html. In the case of an omission, the browser will not display your work. On the contrary, only sometimes illegible codes are displayed on your screen.

The integration of PHP in the HTML file is fairly easy to use. Contrary to what one thinks, php and html are two different things that can combine well. We should just try to use the echo or print functions according to your convenience. However, for simple reading, it is easier to manipulate the echo function in its languages. However, if you have a long enough html, it would be best to use the include in your code. This facilitates the separation of html and php code. Not to get lost over time, it would be best just to add PHP lines in addition to separate clearly. For better readability, it is recommended once again change the extension of your file during the use of the include. It would be enough for you to change * .inc.php.

A note to help you

We can not hide the html code could be used for years. It is however not always update when modifications that brings, it is quite possible that one integrates full of novelties. With that, and to avoid getting lost in the code, put a comment could be of great use.

Les publications similaires de "Devlopment"

  1. 24 Avril 2017Why a developer should know about magento ?807 vues
  2. 22 Déc. 2016We're not Tech Savvy We're RUBY SAVVY1072 vues
  3. 11 Déc. 2016Our agency helps you in the development of the Lodgify.com Software1347 vues
  4. 13 Nov. 2016How to securise your website ?1179 vues
  5. 1 Nov. 2016Php is a knowledge that we master perfectly - Simplyphp.com1155 vues
  6. 29 Sept. 2016How to build a static site ?1153 vues
  7. 23 Sept. 2016Do you know the attack of XSS ?957 vues
  8. 21 Sept. 2016ROR is not about technique, it's just about logic !907 vues
  9. 16 Sept. 2016What is the next code that every clients will want ?636 vues
  10. 6 Déc. 2015Work with Laravel, work with great developers !1610 vues
  11. 14 Nov. 2015One web to print plugin for everybody, developers, manager and user.1790 vues