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.


Get Started Now!

Numeric Array, Array Function, and Double Array Operator in PHP.

Numeric Array

Sample Program

Output:- Rahul

Array Function

Array() function is used to create an array.

Syntax

$array_name = array(“value1″,”value2″,”value3”,……..);

For Example

$name = array(“Sushant”,”Rahul”,”Sameer”,”sujeet”);

Note:- By Default, array starts with index 0.

Sample Program

Output

Double Array Operator

The => operator lets you create key/index – value pairs in the array. The item on the left of the => is the key/index and the item on the right is the value.

For Example:- $name = array(1=>”Sushant”, 3=>”Rahul”, 7=>”Sujeet”, 12=>”Amit”);

In the Above Example, we assigned the index of the array’s. See Below,

$name[1] = Sushant,
$name[3] = Rahul,
$name[7] = Sujeet,
$name[12] = Amit,

Note:- When we assign a value in first array and left others, then next array will automatically assign next value of the previous array.

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.