diff --git a/ch02/multi.php b/ch02/multi.php index 4f05320..92f8ad4 100755 --- a/ch02/multi.php +++ b/ch02/multi.php @@ -9,35 +9,35 @@ 'Yucatan', 'BC' => 'Baja California', 'OA' => 'Oaxaca' -); +]; // Create another array: -$us = array( +$us = [ 'MD' => 'Maryland', 'IL' => 'Illinois', 'PA' => 'Pennsylvania', 'IA' => 'Iowa' -); +]; // Create a third array: -$canada = array( +$canada = [ 'QC' => 'Quebec', 'AB' => 'Alberta', 'NT' => 'Northwest Territories', 'YT' => 'Yukon', 'PE' => 'Prince Edward Island' -); +]; // Combine the arrays: -$n_america = array( +$n_america = [ 'Mexico' => $mexico, 'United States' => $us, 'Canada' => $canada -); +]; // Loop through the countries: foreach ($n_america as $country => $list) { diff --git a/ch08/handle_errors.php b/ch08/handle_errors.php index 5aa5550..e991d7f 100644 --- a/ch08/handle_errors.php +++ b/ch08/handle_errors.php @@ -13,7 +13,7 @@ define('LIVE', FALSE); // Create the error handler: -function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) { +function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) { // Build the error message: $message = "An error occurred in script '$e_file' on line $e_line: $e_message\n"; @@ -32,7 +32,7 @@ function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) { } // End of my_error_handler() definition. // Use my error handler: -set_error_handler ('my_error_handler'); +set_error_handler('my_error_handler'); // Create errors: foreach ($var as $v) {} diff --git a/ch08/report_errors.php b/ch08/report_errors.php index f07ef42..3ecb77d 100644 --- a/ch08/report_errors.php +++ b/ch08/report_errors.php @@ -12,7 +12,7 @@ ini_set('display_errors', 1); // Adjust error reporting: -error_reporting(E_ALL | E_STRICT); +error_reporting(E_ALL); // Create errors: foreach ($var as $v) {} diff --git a/ch09/includes/footer.html b/ch09/includes/footer.html index 9a7d335..38b1964 100644 --- a/ch09/includes/footer.html +++ b/ch09/includes/footer.html @@ -1,8 +1,9 @@ - - - + \ No newline at end of file diff --git a/ch09/includes/header.html b/ch09/includes/header.html index 00ee9fc..5af0a9d 100644 --- a/ch09/includes/header.html +++ b/ch09/includes/header.html @@ -1,23 +1,26 @@ - + - <?php echo $page_title; ?> - - + + + +<?php echo $page_title; ?> + + - - - - + - + \ No newline at end of file diff --git a/ch12/includes/header.html b/ch12/includes/header.html index 00ee9fc..5af0a9d 100644 --- a/ch12/includes/header.html +++ b/ch12/includes/header.html @@ -1,23 +1,26 @@ - + - <?php echo $page_title; ?> - - + + + +<?php echo $page_title; ?> + + - -