Hey, could someone explain how I could use php to select a random bit of text from a text file. Except the hard part is that I want it to select anything between some type of symbol such as +. Like this:
+ Bit of text +
+ Another bit of text +
And it either picks the first text or the second one.
And if anyone want's to check out my awesome IP logger for aim it's at www.techtalk.l2p.net
$pattern = '#\\+(.*?)\\+#s'; preg_match_all($pattern, $input_text, $matches); print_r($matches);
loop through $matches and pull what you want out of it. then pick one randomly, using array_rand() for example.