Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
ARRAY :- Array is a variable, which can hold more than one value OR diffrent types of data types at a time in a single variable.
ex- $data= array( “bikash”, 100,500,”rahul”);
There are three types of array in PHP
- Indexed array : array with a numeric keys.
- Associative arrays : Arrays with named keys
- Multidimensional arrays : Arrays containing one or more arrays
- NUMERIC array:- Numeric Array is a type of array with numeric indices to access its values. However, they can store numbers, characters, strings, etc. By default, the array indices are represented by numbers if not specified, and it starts with index 0 and ends with index -1

2. Associative arrays :-
Associative array differ from numeric array in the sense that associative arrays use diffrents names for id keys. And the key and value is saparated by “=>”.
Below ithe syntax for creating associative array in php
