“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/
Смотрите видео (E-7) - Array in PHP (Part-1) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Planet4Tech 02 Ноябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 201 раз и оно понравилось 20 людям.