Variables and Constants
This commit is contained in:
13
index.php
13
index.php
@ -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>
|
||||||
|
Reference in New Issue
Block a user