Skip to content

Commit

Permalink
week1 update
Browse files Browse the repository at this point in the history
Signed-off-by: Flagship 2 <[email protected]>
  • Loading branch information
Flagship 2 committed Feb 28, 2014
1 parent 9033448 commit 76c821d
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 11 deletions.
9 changes: 9 additions & 0 deletions classwork/week1/alltogethernow.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@
<body>
<p>Create two variables one called $myName and another called $myAge.</p>
<p>Beneath that use echo to print out your name and your age on their own line.</p>
<?php $name = "Brian";
$age =37;
echo $name;
?>
<br>
<?php
echo $age;
?>

</body>
</html>
13 changes: 12 additions & 1 deletion classwork/week1/alltogethernow2.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
</head>
<body>
<p>Create two variables one called $guess and another called $number.</p>
<?php // Write your else if statement to check if the guess is correct
<?php
$guess =50;
$number =50
;
if ($guess == $number) {
echo "correct";
}
else {
echo "incorrect";
}


?>
</body>
</html>
5 changes: 5 additions & 0 deletions classwork/week1/comparison.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<p>Write a comparison that is true</p>
<p>
<?php
if (5 > 6) {
echo "True!";
} else {
echo "False";
}
?>
</p>
</body>
Expand Down
2 changes: 1 addition & 1 deletion classwork/week1/control-flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<body>
<p>
<?php
$students = 8;
$students = 2;
if ($students > 5) {
echo "Holy crap thats a lot of students!";
} else {
Expand Down
2 changes: 2 additions & 0 deletions classwork/week1/echo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
</head>
<body>
<!-- Add your PHP code in the tag below -->
<?php echo "i'm writing php code for echo example";
?>
<h1></h1>
</body>
</html>
2 changes: 1 addition & 1 deletion classwork/week1/first-script.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<p>Put your first and last name inside the quotes below.</p>

<p><?php echo ""; ?></p>
<p><?php echo "Brian Cohen"; ?></p>

<p>This text was not.</p>
</body>
Expand Down
10 changes: 6 additions & 4 deletions classwork/week1/ifstatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
<p>Complete the if statement</p>
<p>
<?php
$age = // Set this to a number greater than 18

___ ($age > 18) ___
$age =20;
if ($age > 18) {
echo "You're old enough to vote!";
___
} else { echo "you're not old enough to vote"; }
elseif ($age ==21); {
echo "get this man a beer";
}
?>
</p>
</body>
Expand Down
1 change: 1 addition & 0 deletions classwork/week1/math.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</head>
<body>
<!-- Add your PHP code in the tag below -->
<?php echo 18*527; ?>
<p></p>
</body>
</html>
4 changes: 2 additions & 2 deletions classwork/week1/semicolon-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Semicolon Comment!</title>
</head>
<body>
<p><?php echo "Fix this string" ?></p>
<p><?php echo "Comment me out"; ?></p>
<p><?php echo "Fix this string"; ?></p>
<p><?php //echo "Comment me out"; ?></p>
</body>
</html>
9 changes: 9 additions & 0 deletions classwork/week1/strings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
</head>
<body>
<!-- Add your PHP code in the tag below -->
<?php
$var = "hey";
$var .=" ";
$var .="you";
$var .=" ";
$var .="guys";
echo $var;
?>

<p></p>
</body>
</html>
4 changes: 2 additions & 2 deletions classwork/week1/switch-syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
$class = "Php 101";

switch ($class) {
__ 'Php 101':
case 'Php 101':
echo "Is Awesome!";
__;
break;
}
?>
</body>
Expand Down
5 changes: 5 additions & 0 deletions classwork/week1/variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
</head>
<body>
<!-- Add your PHP code in the tag below -->
<?php $total = 2 + 2 + 5 + 5;
echo $total; ?>



<p></p>
</body>
</html>

0 comments on commit 76c821d

Please sign in to comment.