Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay
Last active March 14, 2024 03:49
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/1e615fd5334023ae44fbd4b23c9b8ef9 to your computer and use it in GitHub Desktop.
Save JeffreyWay/1e615fd5334023ae44fbd4b23c9b8ef9 to your computer and use it in GitHub Desktop.
PHP For Beginners, Episode 3 - Your First PHP Tag https://laracasts.com/series/php-for-beginners-2023-edition/episodes/3
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<h1>
<?php
echo "Hello, World";
?>
</h1>
<p>
<?php
echo "The teach asked me to echo gibberish text within a paragraph tag.";
?>
</p>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<h1>
<?php
echo "Hello, World";
?>
</h1>
</body>
</html>
@mishlawi-m
Copy link

<title>Demo</title>
<p>
    <?php  
        echo "Hello Mohamad"
    ?>
</p>

@elmergustavo
Copy link

elmergustavo commented Oct 8, 2023

<?php

$numbers = [1, 2, 3, 4, 5];

$odd_numbers = array_filter(
	$numbers,
	function ($number) {
		return $number % 2 === 1;
	}
);

print_r($odd_numbers);

@M0o0hamedAhmed
Copy link

M0o0hamedAhmed commented Mar 14, 2024

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Your First PHP Tag Assignment</title>
</head>
<body>
<p>
    <?php
    echo  "Create a paragraph that uses PHP to echo any basic sentence of your choosing. Practice typing the opening and closing <?php tags.";
    ?>
</p>
</body>
</html>

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