Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
Last active August 4, 2023 20:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffreyWay/25076f684a3e1cba9869772095b166fd to your computer and use it in GitHub Desktop.
Save JeffreyWay/25076f684a3e1cba9869772095b166fd to your computer and use it in GitHub Desktop.
PHP For Beginners, Episode 5 - Conditionals and Booleans
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<h1>
<?= 'Hello World' ?>
</h1>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
<style>
body {
display: grid;
place-items: center;
height: 100vh;
margin: 0;
font-family: sans-serif;
}
</style>
</head>
<body>
<?php
$name = "Dark Matter";
$read = true;
if ($read) {
$message = "You have read $name";
} else {
$message = "You have NOT read $name";
}
?>
<h1>
<?= $message ?>
</h1>
</body>
</html>
@0208234821opoku
Copy link

Mah

@0208234821opoku
Copy link

{ "background_color": "purple", "description": "Shows random fox pictures. Hey, at least it isn't cats.", "display": "fullscreen", "icons": [ { "src": "icon/fox-icon.png", "sizes": "192x192", "type": "image/png" } ], "name": "Awesome fox pictures", "short_name": "Foxes", "start_url": "/pwa-examples/a2hs/index.html" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment