2013-11-10

I have a txt file I put into an array. The data in the txt file has data in the format as:
Order # Date Name City State Zip Code across a row with each item representing a column.

Then there is a 1000 more rows that have these filled in with answers. I want to randomly pick out 5 of these rows. For some reason, it only prints out the first line (Order #, Date, etc).

Here is my code:

Here is some of the text file which I am using.

Order # Date First name Middle Initial Last name Address City State Zip Email Transaction Amount

1 8/26/2012 Kristina H Chung 947 Martin Ave. Muncie CA 46489 khchung@business.com $593

2 11/16/2012 Paige H Chen 15 MainWay Rd. Dallas HI 47281 phchen@business.com $516

3 11/10/2012 Sherri E Melton 808 Washington Way Brazil CA 47880 semelton@business.com $80

4 9/20/2012 Gretchen I Hill 56 Washington Dr. Atlanta FL 47215 gihill@business.com $989

5 3/11/2012 Karen U Puckett 652 Maplewood Ct. Brazil FL 46627 kupuckett@business.com $826

6 7/4/2012 Patrick O Song 679 MainWay Rd. Lafayette GA 47161 posong@business.com $652

Show more