Variables illustration


The current date and time is September 7th, 2010 8:29:AM

Companion Web Site

Larry Ullman has a web site devoted to PHP for the World Wide Web: Second Edition at this location.

It is intended as a supplement /complement to the book and has many helpful resources.

The Book

Variable image

PHP for the World Wide Web: Second Edition written by Larry Ullman

Chapter 7
Using Arrays

"Arrays are significantly different than numbers or strings, and you can't make the most of programming in PHP without them." p155

To Create an Array:

This exercise was to create the array of soups and then to notice the difference in results in using print and print_r to print them to the browser. Print simply shows the single word, Array. Print_r shows the list with its PHP structure.

Mmmmmmmm...soups:
Array
Array ( [Monday] => Clam Chowder [Tuesday] => White Chicken Chili [Wednesday] => Vegetarian )

The arrays below were created by using the range (). I could only get them to work for the alphabet and numbering. I had hoped they would do days of the week or months of the year, but they don't.
Array ( [0] => a [1] => b [2] => c [3] => d [4] => e [5] => f [6] => g [7] => h [8] => i [9] => j [10] => k [11] => l [12] => m [13] => n [14] => o [15] => p [16] => q [17] => r [18] => s [19] => t [20] => u [21] => v [22] => w [23] => x [24] => y [25] => z )
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 )

Things to remember in creating Arrays:

Adding Items to an Array

In this exercise, the soup array script will be used to demonstrate the adding of elements to the list. A count was taken of the first array, and then a second count after the elements were added by using count().

The soups array originally had 3 elements.

After adding 3 more soups, the array now has 6 elements.

Array ( [Monday] => Clam Chowder [Tuesday] => White Chicken Chili [Wednesday] => Vegetarian [Thursday] => Chicken Noodle [Friday] => Tomato [Saturday] => Cream of Broccoli )

To add elements brackets [] are used.

Merging Arrays

The soups script could be re-written with the array_merge() in these ways:

This list of soups was merged with array_merge().

Array ( [Monday] => Clam Chowder [Tuesday] => White Chicken Chili [Wednesday] => Vegetarian [Thursday] => Chicken Noodle [Friday] => Tomato [Saturday] => Cream of Broccoli )

Accessing Array Elements

There is only one way to access an element in an array and that is to refer to its key or index. The conflict of quotes comes up when trying to print a single element from an array. To combat that issue, the whole construct can be wrapped in curly braces. The next problem is the limitations placed on values/elements caused by the fact that an array can store multiple values. So, the best way to reach all the values in an array is to use the 'foreach' loop.

Here is a new soup script (using the old, though) with the foreach! Let's see what happens.

Monday: Clam Chowder
Tuesday: White Chicken Chili
Wednesday: Vegetarian
Thursday: Chicken Noodle
Friday: Tomato
Saturday: Cream of Broccoli

Does this mean I finally understand the foreach???

Creating Multidimensional Arrays

Hmmm, on p 169, it is said "Multidimensional arrays are both simple and complicated at the same time." They are a great way to display more information than the standard array. That is becasue you can use other arrays instead of strings and values.

Here is a script for a multidimensional array holding several chapters of three books.

"My Books and Chapters"

The third chapter of my first book is HTML Forms and PHP.

Wow! It works! let's try another one.

The fourth chapter of my third book is Introduction to SQL and MySQL.

I will stop here although it is fun to choose the information this way, for example, the second chapter in my second book is Object Oriented Programming.

Now let's try a foreach to list out the books.

PHP VQS: Array

PHP Advanced: Array

PHP and MySQL: Array

Now, to list the books and the chapters using the nested foreach.

PHP VQS
Chapter 1 is Getting Started
Chapter 2 is Variables
Chapter 3 is HTML Forms and PHP
Chapter 4 is Using Numbers

PHP Advanced
Chapter 1 is Advanced PHP Programming
Chapter 2 is Object Oriented Programming
Chapter 3 is Databases
Chapter 4 is Security

PHP and MySQL
Chapter 1 is Introduction to PHP
Chapter 2 is Programming with PHP
Chapter 3 is Creating Dynamic Websites
Chapter 4 is Introduction to SQL and MySQL

Wow!

Sorting Arrays

There are a variety of ways to sort and sorting can be numerical or alphabetical. Because each element of an array is a pair (key and value)you can chose to keep the keys as is and sort the values or keep the values and sort the keys.

Array Sorting Functions
Functions Sorts by Keeps Key Values
sort() values No
rsort() values, inverse No
asort() values Yes
arsort() values, inverse Yes
ksort() keys Yes
krsort() keys, inverse Yes

Here is a sorting exercise.

My Little Gradebook

Originally the array looks like this:
Bobby: 95
Alex: 83
Clement: 98
Christina: 65
Manny: 75
Melany: 88
Kaitlin: 71

After sorting the array by value using arsort(), the array looks like this:
Clement: 98
Bobby: 95
Melany: 88
Alex: 83
Manny: 75
Kaitlin: 71
Christina: 65

Now to sort the array by key using ksort(), the array looks like this:
Alex: 83
Bobby: 95
Christina: 65
Clement: 98
Kaitlin: 71
Manny: 75
Melany: 88

Powerful!

Transforming Between Strings and Arrays

I didn't completely undewrstand the reasons for using these functions which are written:

Here is the syntax for explode():

$array = explode ($separator, $string);

or the separator:

$array = explode (',', $string);

or

$array = (' ', $string);

Here is the syntax for implode():

$string = implode ($glue, $array);

or the glue:

$string = implode (',', $array);

or $string = implode (' ', $array);

To Convert Between Strings and Arrays

Because the the explode(), implode() functions are so simple, you can quickly and easily sort a submitted list of words with just a couple of lines. (paraphrased from p 181)

I Must Sort This Out!

Enter the words you want to alphabetize with each word separated by a space from the others:


I used implode to turn the sorted array back into a string but could have used a foreach loop or join() function.

Creating an Array from a Form

The exercises thus far have been creating arrays within a PHP page. This will be different in that it will create an array from input to an HTML Form. This will be shown with a set of checkboxes. Here we go!

Event Name:

Week Days:

Sun M T W Th F Sat


<?php 
/* My Variables for the study group site */
$book "<u>PHP for the World Wide Web: Second Edition</u>";
$author "Larry Ullman";
$myName "Joanne Johnson";
$pageTitle "PHP Study Group ";

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $pageTitle ?></title>

<link href="common/ullman.css" rel="stylesheet" type="text/css" />
<link href="../SpryAssets/ullmanMenu.css" rel="stylesheet" type="text/css" />
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

<!--[if IE 7]><link rel="stylesheet" href="common/fieldsetStyleIe.css" 
type="text/css" /><![endif]-->

<link href="common/form6.css" rel="stylesheet" type="text/css" />
</head>

<body class="thrColHybHdr">

<div id="container">
  <div id="header">
    <h1><?php echo $pageTitle ?></h1>
    <p>Presented by <?php echo $myName ?><br />
    Started January, 2009<br />
    </p>
    <br />
  <!-- end #header --></div>
  <div id="sidebar1">
    <div align="center">
      <?php include("includes/nav.php"); ?>
    <img src="images/var.jpg" 
    alt="Variables illustration" width="140" height="373" />
      <br />
      <br />    
      <br />
      
    </div>
    <p>The current date and time is <?php echo date ("F jS, Y g:i:A");?></p>
  <!-- end #sidebar1 --></div>
  <div id="sidebar2">
    <h3>Companion Web Site</h3>
    <p>Larry Ullman has a web site devoted to <?php echo $book ?> at this 
    <a href="http://www.dmcinsights.com/phpvqs2/" target="_blank">location</a>.</p>
    <p>It is intended as a supplement /complement to the book and has many 
    helpful resources.</p>
    <ul>
      <li><a href="http://www.dmcinsights.com/phpvqs2/errata.php">Errata</a></li>
      <li><a href="http://www.dmcinsights.com/phorum/list.php?10" target="_blank">Forum</a></li>
      <li><a href="http://blog.dmcinsights.com/" target="_blank">L. Ullman Blog</a></li>
      <li><a href="http://www.dmcinsights.com/bk_pages/faq.php?i=phpvqs2" target="_parent">FAQ</a></li>
      <li><a href="http://de.php.net/manual/en/manual.php" target="_blank">PHP Manual</a></li>
    </ul>
    <p><img src="images/book.jpg" alt="The Book" width="163" height="203" /></p>
    
    <div align="center"><img src="images/var.jpg" alt="Variable image" width="150" height="400" />
      </div>
  <!-- end #sidebar2 --></div>
  <div id="mainContent">
  <center><h3><?php echo $book ?> <span class="spanTitle" >written by</span> 
  <?php echo $author ?></h3></center>
    <h2 align="center">Chapter 7<br />
      Using Arrays</h2>
    <p>&quot;Arrays are significantly different than numbers or strings, 
    and you can't make the most of programming in PHP without them.&quot; p155</p>
    <p><strong>To Create an Array:</strong></p>
    <p>This exercise was to create the array of soups and then  to notice the 
    difference in results in using print and print_r to print them to the browser.
    Print simply shows the single word, Array.
    Print_r shows the list with its PHP structure.</p>
    <p>Mmmmmmmm...soups: <br />
      <?php 
    
//script 7.1 soups1.php ini_set ('display_errors', 1);
    
error_reporting (E_ALL & ~E_NOTICE);
    
//create the array
    
$soups = array (
    
'Monday' => 'Clam Chowder',
    
'Tuesday' => 'White Chicken Chili',
    
'Wednesday' => 'Vegetarian'
    
);
    echo 
"$soups";
    
?>
      <br />
      <?php 
    
//script 7.1 soups1.php ini_set ('display_errors', 1);
    
error_reporting (E_ALL & ~E_NOTICE);
    
//create the array
    
$soups = array (
    
'Monday' => 'Clam Chowder',
    
'Tuesday' => 'White Chicken Chili',
    
'Wednesday' => 'Vegetarian'
    
);
    
    
print_r ($soups);
    
?>
    </p>
    <p>The arrays below were created by using the range (). 
    I could only get them to work for the alphabet and numbering. 
    I had hoped they would do days of the week or months of the year, but they don't.<br />
      <?php 
    $alphabet 
range('a''z');
    
print_r  ($alphabet);
    
?>
      <br />
      <?php 
    $order 
range(110);
    
print_r  ($order);
    
?>
    </p>
    <p>Things to remember in creating Arrays:</p>
    <ul>
      <li>If you use array() and list to define an index the others will follow in sequence</li>
      <li>Range() can be used to create an array based on a range of values</li>
      <li>Print and print_r have different effects on printing an array</li>
      <li>Arrays with numbers as keys are <em>indexed</em> arrays</li>
      <li>Arrays with strings as keys are <em>associative</em> arrays</li>
    </ul>
    <p><strong>Adding Items to an Array</strong></p>
    <p>In this exercise, the soup array script will be used to 
      demonstrate the adding of elements to the list.
    A count was taken of the first array, and then a second count after the elements were added by using count().</p>
    <p>
      <?php 
    
//script 7.1 soups1.php ini_set ('display_errors', 1);
    
error_reporting (E_ALL & ~E_NOTICE);
    
//create the array
    
$soups = array (
    
'Monday' => 'Clam Chowder',
    
'Tuesday' => 'White Chicken Chili',
    
'Wednesday' => 'Vegetarian'
    
);
    
//count and print the current number of elements
    
$number1 count ($soups);
    print 
"<p>The soups array originally had $number1 elements.</p>";
    
//now add 3 items to the list
    
$soups['Thursday'] = 'Chicken Noodle';
    
$soups['Friday'] = 'Tomato';
    
$soups['Saturday'] = 'Cream of Broccoli';
    
//count and print the numbe rof elements again
    
$number2count ($soups);
    print 
"<p>After adding 3 more soups, the array now has $number2 elements.</p> ";
    
print_r ($soups);
    
?>
    </p>
    <p>To add elements brackets [] are used.</p>
    <p><strong>Merging Arrays</strong></p>
    <p>The soups script could be re-written with the array_merge() 
    in these ways:</p>
    <ul>
      <li>$new_array = array_merge ($array1, array2); </li>
      <li> $new_array = $array1+array2; </li>
      <li> $array += $array2</li>
    </ul>
    <p><?php 
    
//create the first array
    
$soups = array (
    
'Monday' => 'Clam Chowder',
    
'Tuesday' => 'White Chicken Chili',
    
'Wednesday' => 'Vegetarian'
    
);
    
//create the second array
    
$soups2 = array(
    
'Thursday' => 'Chicken Noodle',
    
'Friday' => 'Tomato',
    
'Saturday' => 'Cream of Broccoli',
    );
    
//merge the arrays
    
$soups array_merge ($soups$soups2);
    
//print the soups merged
    
print "<p> This list of soups was merged with array_merge().</p>";
    
print_r ($soups);
    
?></p>
    <p><strong>Accessing Array Elements</strong></p>
    <p>There is only one way to access an element in an array and that is to refer to its key 
    or index. 
    The conflict of quotes comes up when trying to print a single element from an array. 
    To combat that issue, the whole construct can be wrapped in curly braces. 
    The next problem is the limitations placed on values/elements caused by the fact 
    that an array can store multiple values. 
    So, the best way to reach all the values in an array is to use the 'foreach' loop.</p>
    <p>Here is a new soup script (using the old, though) with the foreach! Let's see what happens.</p>
    <p><?php 
    
//create the soups array
    
$soups = array (
    
'Monday' => 'Clam Chowder',
    
'Tuesday' => 'White Chicken Chili',
    
'Wednesday' => 'Vegetarian',
    
'Thursday' => 'Chicken Noodle',
    
'Friday' => 'Tomato',
    
'Saturday' => 'Cream of Broccoli'
    
);
    
//print each key and value
    
foreach ($soups as $day => $soup){
    print 
"$day: $soup<br />\n";
    }
    
?></p>
    <p>Does this mean I finally understand the foreach???</p>
    <p><strong>Creating Multidimensional Arrays</strong></p>
    <p>Hmmm, on p 169, it is said &quot;Multidimensional arrays are both simple and 
    complicated at the same time.&quot; 
    They are a great way to display more information than the standard array. 
    That is becasue you can use other 
    arrays instead of strings and values.</p>
    <p>Here is a script for a multidimensional array holding several chapters of three books.</p>
    <p>"My Books and Chapters"</p>
    <p>
      <?php 
    
//error handling
    
ini_set ('display_errors'1);
    
error_reporting (E_ALL E_NOTICE);
    
//create the first array 
    
$phpvqs = array (=> 'Getting Started''Variables''HTML Forms and PHP''Using Numbers'
    
);
    
//second array
    
$phpadv = array (=> 'Advanced PHP Programming''Object Oriented Programming''Databases',
    
'Security');
    
//third array
    
$phpmysql = array (=> 'Introduction to PHP''Programming with PHP'
    
'Creating Dynamic Websites''Introduction to SQL and MySQL');
    
//now create the multidimensional array
    //$books array is the master array for the script  with strings for keys and arrays 
    //for vlaues and you use the array()
    //to crate it as with any other array
    
$books = array(
    
'PHP VQS' => $phpvqs,
    
'PHP Advanced' => $phpadv,
    
'PHP and MySQL' => $phpmysql
    
);
    
//print out the name of the 3rd chapter of PHP QuickStart Guide
    
print "<p> The third chapter of my first book is <i>{$books['PHP VQS'] [3]}</i>.</p>";
    print 
"<p>Wow! It works! let's try another one.</p>";
    print 
"<p> The fourth chapter of my third book is<i> {$books['PHP and MySQL'] [4]}</i>.</p>";
    print 
"<p>I will stop here although it is fun to choose the information this way, for example, 
    the second chapter in my second book is <i>{$books['PHP Advanced'] [2]}.</i></p>"
;
    
?>
 </p>
    <p>Now let's try a foreach to list out the books.</p>
    <p>
      <?php //create the first array 
    
$phpvqs = array (=> 'Getting Started''Variables''HTML Forms and PHP''Using Numbers'
    
);
    
//second array
    
$phpadv = array (=> 'Advanced PHP Programming''Object Oriented Programming''Databases',
    
'Security');
    
//third array
    
$phpmysql = array (=> 'Introduction to PHP''Programming with PHP'
    
'Creating Dynamic Websites''Introduction to SQL and MySQL');
    
//now create the multidimensional array
    //$books array is the master array for the script  with strings for keys and 
    //arrays for vlaues and you use the array()
    //to crate it as with any other array
    
$books = array(
    
'PHP VQS' => $phpvqs,
    
'PHP Advanced' => $phpadv,
    
'PHP and MySQL' => $phpmysql
    
);
    foreach (
$books  as $key => $value) {
    print 
"<p>$key: $value</p>\n";
    }
    
?>
 </p>
    <p>Now, to list the books and the chapters using the nested foreach.</p>
     <p>
       <?php //create the first array 
    
$phpvqs = array (=> 'Getting Started''Variables''HTML Forms and PHP''Using Numbers'
    
);
    
//second array
    
$phpadv = array (=> 'Advanced PHP Programming''Object Oriented Programming''Databases',
    
'Security');
    
//third array
    
$phpmysql = array (=> 'Introduction to PHP''Programming with PHP'
    
'Creating Dynamic Websites''Introduction to SQL and MySQL');
    
//now create the multidimensional array
    //$books array is the master array for the script  with strings for keys 
    //and arrays for vlaues and you use the array()
    //to create it as with any other array
    
$books = array(
    
'PHP VQS' => $phpvqs,
    
'PHP Advanced' => $phpadv,
    
'PHP and MySQL' => $phpmysql
    
);
    foreach (
$books  as $title => $chapters) {
    print 
"<p>$title"
    foreach (
$chapters as $number =>
    
$chapter) {
    print 
"<br /> Chapter $number is $chapter";
    }
    print 
'</p>';
    }
    
?>
    </p>
     <p>Wow!</p>
     <p><strong>Sorting Arrays</strong></p>
     <p>There are a variety of ways to sort and sorting can be numerical or alphabetical.
      Because each element of an array is a pair (key and value)you can chose 
      to keep the keys as is and sort the values or keep the values and sort the keys.</p>
     <table width="38%" cellspacing="1" cellpadding="1">
<caption>
         Array Sorting Functions
       </caption>
       <tr>
         <th width="30%" scope="col">Functions</th>
         <th width="34%" scope="col">Sorts by</th>
         <th width="36%" scope="col">Keeps Key Values</th>
       </tr>
       <tr>
         <td>sort()</td>
         <td>values</td>
         <td>No</td>
       </tr>
       <tr>
         <td>rsort()</td>
         <td>values, inverse</td>
         <td>No</td>
       </tr>
       <tr>
         <td>asort()</td>
         <td>values</td>
         <td>Yes</td>
       </tr>
       <tr>
         <td>arsort()</td>
         <td>values, inverse</td>
         <td>Yes</td>
       </tr>
       <tr>
         <td>ksort()</td>
         <td>keys</td>
         <td>Yes</td>
       </tr>
       <tr>
         <td>krsort()</td>
         <td>keys, inverse</td>
         <td>Yes</td>
       </tr>
     </table>
     <p>Here is a sorting exercise.</p>
     <title>My Little Gradebook</title>
     <p>
       <?php 
     
//error handling
    
ini_set ('display_errors'1);
    
error_reporting (E_ALL E_NOTICE);
    
//SORT SCRIPT
    
$grades = array(
    
'Bobby' => 95,
    
'Alex' => 83,
    
'Clement' => 98,
    
'Christina' => 65,
    
'Manny' => 75,
    
'Melany' => 88,
    
'Kaitlin' => 71
    
);
    
//now to print a caption and each element of the array with a foreach loop
    
print "<p>Originally the array looks like this: <br />";
    foreach(
$grades as $student => $grade){
    print 
"$student: $grade <br />\n";
    }
    print 
"</p>";
    
    
//now to sort by highest to lowest grade
    
print "<p>After sorting the array by value using arsort(), 
    the array looks like this: <br />"
;
    
arsort ($grades);
    foreach (
$grades as $student => $grade) {
    print 
"$student: $grade<br />\n";
    }
    print 
"</p>";    
    
    print 
"<p>Now to sort the array by key using ksort(), 
    the array looks like this: <br />"
;
    
ksort ($grades);
    foreach (
$grades as $student => $grade) {
    print 
"$student: $grade<br />\n";
    }
    print 
"</p>";
     
     
?>
    <p>Powerful!     
    <p><strong>Transforming Between Strings and Arrays</strong>     
     <p>I didn't completely undewrstand the reasons for 
     using these functions which are written:     
     <ul>
       <li>implode() to turn an array into a string</li>
       <li>explode() to turn a string into an array</li>
     </ul>
     <p>Here is the syntax for explode():</p>
     <p>$array = explode ($separator, $string);</p>
     <p>or the separator:</p>
     <p>$array = explode (',', $string);</p>
     <p>or </p>
     <p>$array = (' ', $string);</p>
     <p>Here is the syntax for implode():</p>
     <p>$string = implode ($glue, $array);</p>
     <p>or the glue:</p>
     <p>$string = implode (',', $array);</p>
     <p>or $string = implode (' ', $array);</p>
     <p><strong>To Convert Between Strings and Arrays</strong></p>
     <p>Because the the explode(), implode() functions are so simple, you can quickly 
     and easily sort a submitted list of words with just a couple of lines. 
     (paraphrased from p 181)</p>
     <p><strong>I Must Sort This Out!</strong></p>
     Enter the words you want to alphabetize with each 
     word separated by a space from the others: <br /><br />
     <form action="handle_list.php" method="post">
     <input type= "text" name="words" size="60" />
     <br />
     <input type="submit" name="submit" value="Alphabetize!" />
     </form>
     <p>I used implode to turn the sorted array back into a string but could have 
     used a foreach loop or join() function.</p>
     <p><strong>Creating an Array from a Form</strong></p>
     <p>The exercises thus far have been creating arrays within a PHP page. 
     This will be different in that it will create an 
     array from input to an HTML Form. This will be shown with a set 
     of checkboxes. Here we go!</p>
     <form action="handle_event.php" method="post"> 
      
      <p>Event Name: <input type="text" name="name" size="30" /></p>
<p>Week Days:</p>
<p>
 Sun <input type="checkbox" name="weekdays[]" value="Sunday" />    
  M<input type="checkbox" name="weekdays[]" value="Monday" />
   T<input type="checkbox" name="weekdays[]" value="Tuesday" />
 
    W<input type="checkbox" name="weekdays[]" value="Wednesday" />

  Th<input type="checkbox" name="weekdays[]" value="Thursday" />
 
  F<input type="checkbox" name="weekdays[]" value="Friday" />
 
 Sat<input type="checkbox" name="weekdays[]" value="Saturday" />
   </p>
<p>
  <input type="submit" name="submit" value="Add the Event!" />
</p>
<br />
    </form>
  </div>
  <div id="footer">
  <p><br class="clearfloat" />
    </p>
    <p align="center">&copy;R. Joanne Johnson 2009 </p>
    <p align="center"><a href="http://validator.w3.org/check?uri=referer" 
    target="_blank"><img
        src="http://www.w3.org/Icons/valid-xhtml10"
        alt="Valid XHTML 1.0 Transitional" width="88" height="31" border="0" /></a></p>
  <!-- end #footer --></div>
<!-- end #container --></div>
 
<div id="sourceDiv">
   <?php  
   
/* shows the source code of the page */
   
show_source(basename($_SERVER['PHP_SELF'])); ?>
    
  <?php  
   
/* shows source for nav bar include */
  
show_source("includes/nav.php");?>
</div>


</body>
</html>
<ul id="MenuBar1" class="MenuBarVertical">
          <li><a href="/ullmanBook/chapter1.php">Chapter 1</a></li>
      <li><a href="/ullmanBook/chapter2.php">Chapter 2</a></li>
  <li><a href="/ullmanBook/chapter3.php">Chapter 3</a> </li>
  <li><a href="/ullmanBook/chapter4.php">Chapter 4</a></li>
  <li><a href="/ullmanBook/chapter5.php">Chapter 5</a></li>
  <li><a href="/ullmanBook/chapter6.php">Chapter 6</a></li>
      <li><a href="/ullmanBook/chapter7.php">Chapter 7</a></li>
  <li><a href="#">Chapter 8</a></li>
      <li><a href="#">Chapter 9</a></li>
      <li><a href="#">Chapter 10</a></li>
      <li><a href="#">Chapter 11</a></li>
      <li><a href="#">Chapter 12</a></li>
      <li><a href="#">Chapter 13</a></li>
      <li><a href="/ullmanBook/index.php">Home</a></li>
       <li><a href="http://www.lzydaz.com/phpBB3/index.php" target="_blank">Hello World</a></li>
       <li><a href="http://www.lzydaz.com/studygroup/php/index.php" target="_blank">Bonnie</a></li>
       <li><a href="http://www.amaraland.com/studyGroup/index.php" target="_blank">Kc Ladybug</a></li>
       <li><a href="http://krisse.tuna.fi/phpwww/ch1.php" target="_blank">Krisse</a></li>
       
       
    </ul>