PHP Arrays: Single, Multi-dimensional, Associative and Object Arrays in PHP 7

Steve Prettyman

  • 出版商: Apress
  • 出版日期: 2016-12-20
  • 售價: $1,125
  • 貴賓價: 9.5$1,069
  • 語言: 英文
  • 頁數: 180
  • 裝訂: Paperback
  • ISBN: 1484225554
  • ISBN-13: 9781484225554
  • 相關分類: PHP
  • 立即出貨 (庫存=1)

買這商品的人也買了...

商品描述

Gain an in-depth understanding of PHP 7 arrays. After a quick overview of PHP 7, each chapter concentrates on single, multi-dimensional, associative, and object arrays. PHP Arrays is a first of its kind book using PHP 7 that demonstrates inserting, appending, updating, and deleting array data.

This book also covers validation methods to insure that the data provided by a user is good before the data is entered into an array. You’ll see how PHP 7 try/catch modules are used to capture exceptions and errors that may be caused by invalid data.

The code examples demonstrate common real-world scenarios. Moreover, examples of every PHP 7 array function (over 75) are demonstrated. The appendix provides a two-dimensional array case study on the logical design of a checkers game.

PHP Arrays answers the following questions:

  • Why do we need arrays? When do we need to use arrays?
  • Are arrays efficient? Can arrays reduce coding time?
  • When do you use multi-dimensional and associative arrays?
  • What is an object array? 


What You'll Learn

  • Handle array data from an HTML form
  • Manage array data from a text file
  • Deal with array data from a MySQL database


Who This Book Is For

Experienced PHP programmers or web developers using PHP.


 

商品描述(中文翻譯)

深入了解 PHP 7 陣列。在對 PHP 7 進行快速概述後,每個章節都專注於單一、多維、關聯和物件陣列。《PHP 陣列》是一本使用 PHP 7 的首部著作,展示了插入、附加、更新和刪除陣列資料的方法。

本書還介紹了驗證方法,以確保使用者提供的資料在輸入陣列之前是正確的。您將看到如何使用 PHP 7 的 try/catch 模組來捕獲由無效資料引起的例外和錯誤。

程式碼範例展示了常見的實際情境。此外,還演示了每個 PHP 7 陣列函數(超過 75 個)的範例。附錄提供了一個關於跳棋遊戲邏輯設計的二維陣列案例研究。

《PHP 陣列》回答了以下問題:
- 我們為什麼需要陣列?何時需要使用陣列?
- 陣列是否高效?能否減少編碼時間?
- 何時使用多維和關聯陣列?
- 什麼是物件陣列?

你將學到以下內容:
- 處理來自 HTML 表單的陣列資料
- 管理來自文字檔案的陣列資料
- 處理來自 MySQL 資料庫的陣列資料

本書適合有經驗的 PHP 程式設計師或使用 PHP 的網頁開發人員。