General Community > Scripting Help

Random Text

(1/3) > >>

morph:
Hey everyone,

i was wondering how to create random text for a sig that i'm working on, like what david has.  Any help would be nice,

Thanks

morph

eFishie:
And my sig, too!

I use arrays, like this:

<?php
 $a=array("Hi","Bye","Go","Away","I","Am","Cool");
 $num=count($a)-1;
 $b=rand(0,$num);
 print "I say: $a[$b]";
?>

Shadow:
http://www.simplemachines.org/community/index.php?threadid=1038

And of course what <?php Piranha ?> was saying -_-

eFishie:
Now why did my PHP code not color code itself?

Tyris:
I assume it only colours if you've got the php part... so <?php ?> works.. but not <? ?>
heheh, feel the power of colour!!! OU!! aussie spelling is teh better :P

Navigation

[0] Message Index

[#] Next page

Go to full version