
FishMonger
Veteran
Mar 5, 2011, 5:34 AM
Views: 1458
|
|
Re: [tbone587] Taking input multiples times and storing into array
|
|
|
Please post your responses here instead of a PM.
thanks a lot for your help. When I go to print out the input how to I print each one? For instance how would I print the second input? Also can you explainm the $i-1 part? I really appreciate any help. Use a for/foreach loop to output each element of the array. Arrays are zero indexed, meaning the first element is index 0. Since the for loop I used starts at 1 instead of 0, you need to subtract 1 from $i to access the proper index. The second input, which is the second array element, is accessed as:
(This post was edited by FishMonger on Mar 5, 2011, 5:39 AM)
|