PHP Get random paragraph

Posted by Jack on Stack Overflow See other posts from Stack Overflow or by Jack
Published on 2010-04-23T03:13:56Z Indexed on 2010/04/23 3:23 UTC
Read the original article Hit count: 225

Filed under:
|
|
|
|

Anyone know how to get a random set of lines from a text file?

I want to get a set of 3 lines with <br> on the front of each and display them through html.

example:

set 1
<br>Hi
<br>what's your name
<br>goodbye

set 2
<br>stack
<br>overflow
<br>hi there

set 3,4,5....

Choose one random set and display it. The sets of lines would be stored in a text file.

Thanks a lot!

© Stack Overflow or respective owner

Related posts about php

Related posts about html