I'm looking for suggestions on how i might improve a bit of code i've included.
essentially it adds a random number of <BR> tags to random indexes within an array of random words that varies between 1 and 300 indexes (inclusive).
in other words:
i have an array of strings, which are words randomly chosen from a larger list contained in a mysql database. the array index can range anywhere from 1 to 300, but is confined to that max and min.
what i'd like to do is insert html <BR> tags into a random number of the array's indexes, picking the indexes, and how many indexes are picked, randomly.
for example if i have an array that contains:
0 = then
1 = when
2 = i
3 = printed
4 = my
5 = it
6 = would
7 = display
8 = like
9 = this
10 = .
and, as the contents state, ideally a print statement
would give me something along the lines of:
"then when
i
printed
out my array, it
would
display like
this
."
(continued in reply)