What is PHP and how do I use it?
PHP is an acronym for “PHP: Hypertext Preprocessor”. Learn about PHP and the basics you need to know to get started.
PHP stands for “PHP: Hypertext Preprocessor”. It is a scripting language that allows web developers to run processes from a web page. Instead of these scripts run on the browser, they run on the web server and then provide the script output to the web page.
The advantage of using PHP is that it allows developers to display much more interactive and dynamic web page content without slowing down the browser or consuming the user’s CPU. These scripts are embedded directly into the HTML of the web page which produces this static page content.
How to embed PHP in a web page
Integrating PHP functions into an HTML web page is very easy. Just preface the script with then place ?> at the end of the scenario.
Anything between these tags will run on the server as a PHP script. The output of this script will be displayed on the page where you embedded it.
One of the simplest PHP functions is the “echo” function, which returns plain text. Embedding a simple PHP function like this works like this:
My PHP echo example
echo “Hello everyone!”;