how to use arrays? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how to use arrays?

10th Jun 2016, 6:57 PM
Kinoshanth Sivakumar
Kinoshanth Sivakumar - avatar
2 Answers
+ 1
if you are access the array data use array index array index start must be 0 $arr=array("Ashvin","Kino","Many_More"); echo $arr[0]; echo $arr[1];
25th Jun 2016, 9:01 PM
Âshvin Solanki
Âshvin Solanki - avatar
0
Example. $test = array("Name1"=>"David","Name2"=>"Alex","Name3"=>"Martin"); echo $test[Name2]; // Otputs 'Alex'
13th Jun 2016, 4:59 PM
#Bargas
#Bargas - avatar