tailieunhanh - Web engineering: Lecture 21, 22 - Majid Mumtaz

In this lecture, we will learn PHP Arrays. In PHP there are three type of arrays: Index arrays/Numeric, associative arrays, multidimensional arrays. In lecture 21 and 22, we will learn three type of PHP Arrays. Inviting you to refer. | Web Engineering Lecture 21-22 MAJID MUMTAZ Department of Computer Science CIIT Wah 1 PHP Arrays What is an Array - An array stores multiple value in one signle variable. Or we can say that - An array is a special variable which can hold more than one same types of value . In PHP there are three type of arrays 1. Index arrays Numeric Array with numeric index. 2. Associative arrays Arrays with named keys 3. Multidimensional arrays Arrays containing one or more arrays 2 PHP Arrays Index arrays Numeric A numeric array stores elements with a numeric ID key. The numeric index can be assigned automaticaly and index will start at 0. Declaration books array php java c OR books 0 php books 1 java books 2 c Example php books array php java c Echo I like . books 0