80 likes | 214 Views
PHP is a scripting language that has the ability to output HTML. Instead of manually writing HTML files, you can program PHP to automatically generate them for you. • Did you know that every page you see on this website is generated from a single PHP script? This means that when a new page is added, there’s no need to manually create an HTML file. The PHP script generates it.<br>
E N D
PHP is a scripting language that has the ability to output HTML. Instead of manually writing HTML files, you can program PHP to automatically generate them for you. • Did you know that every page you see on this website is generated from a single PHP script? This means that when a new page is added, there’s no need to manually create an HTML file. The PHP script generates it.
PHP scripts are embedded inside HTML files. The start of a PHP script is indicated by <?php and the end is indicated by ?>. When a script is run, it’s replaced in the HTML by its output.
One of the useful features of PHP is its ability to include files inside other files. • Many websites use the same header on every page of their site. With PHP, they can write their header in a separate HTML file called header.html, and have PHP ‘include’ the contents of this file on every other page.
PHP is a very powerful language with many capabilities, most of which are beyond the scope of this tutorial. But luckily for you, there is more extensive PHP training available if you want to go further with PHP. • You can get online PHP training from providers like Treehouse. PHP is also covered by some good books such as PHP and MySQL for Dynamic Websites, and PHP and MySQL Web Development.