Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
phpathetic/index.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
48 lines (37 sloc)
1.11 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Title of my page | |
$page_title = "Brian's Cool Page"; | |
// Photo or Avatar | |
$photo = "https://en.gravatar.com/userimage/3544289/de193efc4cc1387438c49d954bf0911c.png"; | |
// Full Name | |
$full_name = "Brian Daley"; | |
/ Favorite Food | |
$food = "Burritos; | |
// Year born | |
$born = 1981 | |
// Age = (Current Year) - (Year Born) | |
$age = @date("Y") + $born; | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title><?php echo $page_title; ?></title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" /> | |
<style media="screen"> | |
body { | |
margin: 1em; | |
} | |
img { | |
float: left; | |
margin-right: 1em; | |
} | |
</style> | |
</head> | |
<body> | |
<h1><?php echo $page_title; ?></h1> | |
<img src="<?php echo $photo; ?>" alt="Photo of <?php echo $full_name; ?>"> | |
<p><strong>Name</strong>: <?php echo $full_name; ?></p> | |
<p><strong>Age</strong>: <?php echo $age; ?></p> | |
<p><strong>Favorite Food</strong>: <?php $food; </p> | |
</body> | |
</html> |