Projects1 2 3
Journal 1 2 3 4 5 6
Assignments:


PHP Output


Code

Here are two variables ($name=Aimee and $number=25)

My name is Aimee and I am 25 years old


<?php
$number = 25;
$name = Aimee;
echo "My name is $name and I am $number years old.";
?>

 

Information stored in an array and displayed in a table.

                          Name           Aimee Rydarowski                           Address           3418 Cranborne Chase                           City           Marietta                           State           GA                           Zipcode           30062                           D.O.B.           11-29-1980

 

 

<?php
$info = array ('Name' => 'Aimee Rydarowski', 'Address' => '3418 Cranborne Chase', 'City' => 'Marietta', 'State' => 'GA', 'Zipcode' => '30062', 'D.O.B.' => "11-29-1980");
foreach ($info as $key => $value) {
echo("<tr> <td> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp; $key </td> <td> &nbsp &nbsp &nbsp &nbsp &nbsp $value </td> </tr");
}
?>

PHP file with an object class which prints above info to the screen.

Aimee Rydarowski
3418 Cranborne Chase, Marietta, GA, 30062
11-29-1980
<?php

$myinfo = new Info("Aimee Rydarowski", "3418 Cranborne Chase", "Marietta", "GA", "30062", "11-29-1980");
$myinfo -> printInfo();

class Info {
var $name;
var $address;
var $city;
var $state;
var $zip;
var $dob;

function Info ($n, $a, $c, $s, $z, $d) {
$this->name = $n;
$this->address = $a;
$this->city = $c;
$this->state = $s;
$this->zip = $z;
$this->dob = $d;
}

function printInfo() {
echo("$this->name<br>");
echo("$this->address, $this->city, $this->state, $this->zip<br>");
echo("$this->dob<br>");
}
}
?>
This is a link to a Google Map for assignment d.  
This is a link to a Google Map for assignment e.