Multiple changes
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 205 KiB |
Binary file not shown.
@@ -1,17 +1,24 @@
|
||||
<?php
|
||||
$favorite_ice_cream = "Mint Chocolate Chip";
|
||||
$dog_type = "Border Collie";
|
||||
$dog_type = 12;
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Levi McLean Lab 2</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$favorite_ice_cream = "Mint Chocolate Chip";
|
||||
$dog_type = "Border Collie";
|
||||
$dog_type = 12;
|
||||
|
||||
define("ERROR_MSG", "You have encountered an error, click the back button and try again.");
|
||||
define("ERROR_MSG", "You have encountered an error, click the back button and try again.");
|
||||
|
||||
echo("Hello World! <br>");
|
||||
echo("This is PHP. <br>");
|
||||
echo("This is the first string " . "this is the second string " . "this is my last string <br>");
|
||||
echo("We are in the month of " . date("F") . "<br>");
|
||||
echo("The value in the query string for my_var is " . $_REQUEST['my_var'] . "<br>");
|
||||
echo("My favorite flavour of ice cream is " . $favorite_ice_cream . "<br>");
|
||||
echo("My dog is a " . $dog_type . "<br>");
|
||||
echo("My dog is a " . $dog_type . "<br>");
|
||||
echo ERROR_MSG;
|
||||
?>
|
||||
echo("Hello World! <br>");
|
||||
echo("This is PHP. <br>");
|
||||
echo("This is the first string " . "this is the second string " . "this is my last string <br>");
|
||||
echo("We are in the month of " . date("F") . "<br>");
|
||||
echo("The value in the query string for my_var is " . $_REQUEST['my_var'] . "<br>");
|
||||
echo("My favorite flavour of ice cream is " . $favorite_ice_cream . "<br>");
|
||||
echo("My dog is a " . $dog_type . "<br>");
|
||||
echo("My dog is a " . $dog_type . "<br>");
|
||||
echo ERROR_MSG;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
@@ -0,0 +1,62 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Week 2 Notes</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$globalVar = "I'm global!";
|
||||
|
||||
function greet($fname, $lname) {
|
||||
echo("Hello, " . $fname . " " . $lname . "!");
|
||||
}
|
||||
|
||||
function greet2($name = "Guest") {
|
||||
echo("Hello, " . $name . "!");
|
||||
}
|
||||
|
||||
function add($a, $b) {
|
||||
return $a + $b;
|
||||
}
|
||||
|
||||
function test() {
|
||||
global $globalVar;
|
||||
echo $globalVar;
|
||||
}
|
||||
|
||||
greet("Levi", "McLean");
|
||||
|
||||
greet2()
|
||||
|
||||
$result = add(5, 3);
|
||||
echo $result;
|
||||
|
||||
define("CENTS_IN_DOLLAR", 100);
|
||||
|
||||
$name = "Levi McLean";
|
||||
echo("<p>Hello $name</p>");
|
||||
|
||||
$name = "Batman";
|
||||
echo("<p>Hello $name</p>");
|
||||
print_r($name);
|
||||
|
||||
echo "1231\"\"2321";
|
||||
|
||||
phpinfo();
|
||||
|
||||
$int = 1;
|
||||
|
||||
$float = 1.0;
|
||||
|
||||
$seasons = [
|
||||
"Winter",
|
||||
"Spring",
|
||||
"Summer",
|
||||
"Fall",
|
||||
];
|
||||
|
||||
$years = [1, 2, 3, 4, 5];
|
||||
|
||||
$_SERVER = "Bob";
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user