Variables and Constants
This commit is contained in:
13
index.php
13
index.php
@ -1,7 +1,11 @@
|
||||
<?php
|
||||
|
||||
// This is a comment
|
||||
// echo 'Hello World!';
|
||||
// This is a constant
|
||||
define('NAME', 'Yoshi');
|
||||
|
||||
// This is a variable
|
||||
$age = 30;
|
||||
$age = 25;
|
||||
|
||||
?>
|
||||
|
||||
@ -11,6 +15,9 @@
|
||||
<title>My First PHP File</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1><?php echo 'Hello World'; ?></h1>
|
||||
<h1>User Profile Page</h1>
|
||||
|
||||
<div><?php echo NAME; ?></div>
|
||||
<div><?php echo $age; ?></div>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user