Learning and Using PHP

PHP (Hypertext Preprocessor) is one of the most popular server scripting languages that also supports a hosted desktop. It comprises text files that are not compiled in binary. When you request a page, PHP reads the code and interprets it as you go. You will be able to use any text editor to code in PHP, including the Windows notebook and there are hundreds of other editors. It is up to you to use a text editor that suits you best.

More information on hosted desktop

When you save your text file with the extension .php, you can have several codes in: (X) HTML, Javascript and CSS. How does the PHP parser make the difference?

The PHP code is located between the Tags. It is important to take stock of the other existing syntax that you will sometimes encounter if you download some badly encoded sources. These are . Do not use these tags because they may not be compatible with all existing server configurations. To put it simply, PHP has a setting called short_open_tags, which can take two values (On or Off).

If it is On, this syntax will be accepted and understood by the code parser, if not your scripts cannot be interpreted. Whatever the value from this option, your scripts will work perfectly.

When to use PHP?

By learning PHP, you are more likely to convert your site to PHP and thus replace the code (X) HTML by echo () in burst. This is not a good solution; you should not use PHP to generate static content. If your page is not destined to change in a dynamic fashion, leave it in HTML. You will gain performance and relieve your server. When you have a lot of files in your directory, you will be able to know which ones are static.

The display of the text can be done in different ways. You will learn about the simplest and fastest way (in terms of server processing time) to display text. There is the echo () (it is a structure of the language and not a function). It is not mandatory to use it with parentheses.

Each statement ends with a semicolon in PHP, do not forget it because you will sometimes notics insoluble errors if your code is too long. Comments are very useful for providing useful information on what a piece of code will do. They will not be displayed or analyzed by PHP. You can put what you want in it (PHP code or (X) HTML). Comments on several lines can occupy one or more lines and are delimited by the tags / * and * /.

Learning PHP

To learn PHP, you need access to a web server. This means you may have to rent a server or install one on your computer (hosted desktop). You can take advantage of a wide variety of online resources, classroom courses, books and online courses. A good example of an online learning resource is w3schools.com. In the UK, many learning centres teach PHP and other computer programming subjects. These include Web Studio Training, the University of London, LSA Training, Cardiff University and more.