From 9dab7bf8d760bf83ea3612310b6a8c1356c57df5 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Thu, 30 Dec 2010 08:31:03 -0500 Subject: [PATCH] more looping stuff and playing with colors for Stephen, generalized header bits a touch --- docroot/html/_head.php | 35 +++++++++++++++++++++ docroot/html/loops.php | 71 ++++++++++++++++++++++++++++++++---------- 2 files changed, 89 insertions(+), 17 deletions(-) create mode 100644 docroot/html/_head.php diff --git a/docroot/html/_head.php b/docroot/html/_head.php new file mode 100644 index 0000000..cd44d35 --- /dev/null +++ b/docroot/html/_head.php @@ -0,0 +1,35 @@ + + + + + <?php echo $title; ?> + + + diff --git a/docroot/html/loops.php b/docroot/html/loops.php index b34d44d..c1a075d 100644 --- a/docroot/html/loops.php +++ b/docroot/html/loops.php @@ -1,22 +1,34 @@ - - - - looping! - - +

Using <pre> bgcolor =

+ +
+
+
+
+
+ + +
 "My House",
+        "2nd" => "My Car",
+        "3rd" => "My Lab"
+    );
+
+    foreach ($array as $key => $value) {
+
+        if ($value == "My Lab") {
+            $array[$key] = $value = "My Laboratory";
+        }
+
+        print "$key holds the value $value \n";
+    }
+
+    ?>
+