I have an array like below:
@array = ("123", "Main Street", "Denver", "456", "North Street", "Chicago")
How do I do a loop whereas I put the components of this array into three variables such as:
$street_number = @array[0];
$street = @array[1];
$city = @array[2];
#Process this stuff......
#Loop back and get the next 3.
I know this is simple, but I'm getting confused as someone (on another board) directed me to using 'foreach' but that doesn't seem to be working, and we've been back and forth and I'm just not getting anywhere.
Thanks
Sam


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks