click below button to copy the code. php tutorial - team
php program Code Explanation :
In this statement we define the multidimensional array for the variable “$var1” by using array function and inside the array function we define another array name as ”samp1” and the values are 1,2 and 3.
print_r($var1); statement prints the php array structure.
In this echo statement we print the value of the “$var1” variable that holds the first row of the php array that will be indexed as (0) and the first column value in this example “samp1” as php array is stored in this index and here we using associative array php function.
In this echo statement we print the value of the “$var1” variable that holds the first row of the array that will be indexed as (0) and the second column value.
In this echo statement we print the value of the “$var1” variable that holds the first row of the php array that will be indexed as (1) and the third column value.
php coding Sample Output :
array php structure stores the format with its index value of “samp1” as “1”.