PHP 101: Fundamentals

Stephanie De Smedt
5 min readApr 19, 2022
Photo by KOBU Agency on Unsplash

This article is the first in (what will be) a 8-part series covering the fundamentals of PHP. Links to the other articles on the topic will be listed at the bottom of the page when available for those who are interested.

PHP has been around since 1994 and is the server scripting language used by companies such as Wordpress, Slack and Etsy. In fact PHP can be found in over 75% of webpages and is a powerful tool for creating interactive and dynamic webpages. Although more recent alternatives are giving it some competition PHP is a handy language to learn to be versatile in the industry.

Let's start at the beginning…

Photo by Hello I'm Nik on Unsplash

PHP can either be written inline within a HTML script or contained in a separate file and linked back into the HTML.

If you only require a short snippet of PHP script then all that is required is to write your PHP code in between an opening and closing tag within the HTML file as follows:

<?php "insert your code here" ?>

When an independent “.php” file is being created, first you will need to link to the file from within your HTML document. This is done by adding a line of PHP script…

--

--

Stephanie De Smedt

Project Manager learning Web and Mobile Development. A lifelong learner with a travel and coffee problem.