Variables and Constants

This commit is contained in:
2025-05-29 21:34:31 -04:00
parent 499a6cd8a4
commit a0e6cbf9bc

View File

@ -1,7 +1,11 @@
<?php <?php
// This is a comment // This is a constant
// echo 'Hello World!'; define('NAME', 'Yoshi');
// This is a variable
$age = 30;
$age = 25;
?> ?>
@ -11,6 +15,9 @@
<title>My First PHP File</title> <title>My First PHP File</title>
</head> </head>
<body> <body>
<h1><?php echo 'Hello World'; ?></h1> <h1>User Profile Page</h1>
<div><?php echo NAME; ?></div>
<div><?php echo $age; ?></div>
</body> </body>
</html> </html>