(E-7) - Array in PHP (Part-1)

Published: 02 November 2022
on channel: Planet4Tech
201
20

“Array is a variable which can hold multiple values in a single variable name.”

Note – As PHP is a dynamically typed programing language, it allows storing data of different types in a single array unlike other programming languages like Java, C#, etc.

Syntax:
$a=array( ); // $a=[ ];

Types: There are 2 types of arrays in PHP
------------------------------------------
On the basis of keys
----
1. Indexed Array - Key not needed to specify. Default key assigned from 0 to n-1. (N=Size of the array)
2. Associative Array – We can associate every value of the array to any name, these names must be unique and will be considered as keys of the array.

On the basis of Dimensions
------
1. One-Dimensional Array (1-d) – Array which holds values directly.
Example - details of a single employee in the company.
2. Multi-Dimensional Array (n-d) – Array which holds an array inside it.
Example – Details of all the employees in the company.

Complete Course: https://planet4tech.com/php/complete-...

Join Our Team
------------------------
Facebook Page: https://www.facebook.com/profile.php?...
LinkedIn Page:   / planet4tech  
WhatsApp Group: https://chat.whatsapp.com/CxjN4h9A09l...
Telegram: https://t.me/+eMrhSXYDFZk0NjNl
Website: https://planet4tech.com/


Watch video (E-7) - Array in PHP (Part-1) online without registration, duration hours minute second in high quality. This video was added by user Planet4Tech 02 November 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 201 once and liked it 20 people.