NSA
sudo apt-get thefuckout.tar.gz
- Dec 9, 2011
- 715
- 86
The code below will show a new line of text each time the page is refreshed.
If you add more strings, change the number "2" in "$new = (rand(0,2));" to the new amount of lines.
Example: If you add a fourth line of text, change "2" to "3".
If you add more strings, change the number "2" in "$new = (rand(0,2));" to the new amount of lines.
Example: If you add a fourth line of text, change "2" to "3".
Code:
<?php
$text=array("This is the first piece of text.","This is the second piece of text.","This is the third piece of text.");
$arrlength=count($text);
$new = (rand(0,2)); //The array starts at zero, if you add more text change "2" to the new amount
echo $text[$new]; //Echo's a random string by getting a number from $new
?>