0% found this document useful (0 votes)
4 views4 pages

Alfaro KC L. Assignment2

Uploaded by

kaimontinola625
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Alfaro KC L. Assignment2

Uploaded by

kaimontinola625
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

IT-WS03

What is Array?
In PHP, an array is a special type of variable that allows you to
store multiple values under a single name. These values can be
of any data type, and they are organized in a way that each value
is associated with a unique index or key. PHP arrays can be used
to store and manipulate collections of data efficiently.
What is numeric array?
A numeric array in PHP is an array where the elements
are indexed by numeric values. The index starts from 0
for the first element, 1 for the second element, and so on.
Numeric arrays are used when you need a collection of
values that can be accessed and manipulated using
numerical indices.

Example:
What is associative array?
An associative array in PHP is an array where each
element is associated with a specific key or name. Unlike
numeric arrays, where the keys are implicitly assigned as
integers starting from 0, associative arrays use explicitly
defined keys. These keys are used to access the
corresponding values in the array. Associative arrays are
useful when you want to organize data using meaningful
identifiers.

Example:

You might also like