All pastes #895172 Raw Edit

Miscellany

public php v1 · immutable
·published 2008-02-07 17:00 UTC
rendered paste body
<?phpsrand((float) microtime() * 10000000);$first = 0;$second = 1;$article = array("the", "a", "one", "some", "any");$noun = array("boy", "girl", "dog", "town", "car");$verb = array("drove", "juped", "ran", "walked", "skipped");$preposition = array("to", "from", "over", "under", "on");$rand_article = array_rand($article, 2);$rand_noun = array_rand($noun, 2);$rand_verb = array_rand($verb);$rand_preposition = array_rand($preposition);for ( $counter = 0; $counter <= 19; $counter++) {        if($first > 5) {$first = 0;}        if($second > 5) {$second = 1;}        echo $noun[$rand_noun[$first]], " ", $verb[$rand_verb[$first]], "\n";        $first++;        $second++;}?>