-
Understand PHP tags <?php ?>
-
Datatypes: String, Integer, Array
-
Declare and use variables
Implementation Guide
Learn how to write your first PHP script and store data in variables.
Step 1: Create a PHP file
Create 'index.php' in 'C:/laragon/www/team-php/'
Step 2: Write code
<?php
$greeting = "Hello, Laragon!";
$year = 2025;
echo $greeting . " Welcome to " . $year;
?>
Step 3: Run it
Open browser: http://learn-php.test
Common Issues
Learn how to write your first PHP script and store data in variables.
White screen / 500 Error
Check for missing semicolons (;) at end of lines.
Variables not showing
Ensure you use the $ sign before variable names.

