Thuta Learning
BasicProgrammingbeginner

PHP Intro

Relax. We'll talk through this in plain words — no textbook voice.

PHP (Hypertext Preprocessor) is an open-source server-side scripting language that runs on a web server. The browser never sees the PHP code — the server processes the PHP and sends the resulting HTML/CSS/JavaScript to the browser. That's why things like login, database queries, form submissions, and dashboard data can be handled securely on the server side.

php
<!DOCTYPE html>
<html>
<body>

<h1>My first PHP page</h1>

<?php
echo "Hello World!";
?>

</body>
</html>
You should see
The browser shows "Hello World!" under the heading "My first PHP page".

Easy traps

  • If you save the file with a .html extension, PHP won't run — it has to be .php.
PHP Intro | Thuta Learning