In php the indexed arrays starts with the numeric values that is ‘keys’, which are indexed in which the index value starts with zero (0).
The index values will be assigned automatically or you can assign manually also.
php developer Syntax :
php 7 Sample Code : sample php program
php program Code Explanation :
In this statement we define the indexed array for the variable “$sample” by using array function and the value are separated by using commas (,).
In this echo statement we print the content “first index value and “$sample [0]” variable value. In the same way remaining two echo statements will be printed.
php coding Sample Output :
For the array “sample” the index value “0” prints the echo statement "First index value -Zero”.
for the array “sample” the index value “1” prints the echo statement "Second index value -One”.
For the array “sample” the index value “2” prints the echo statement "Third index value -two”.