does anyone know how i can do a random sentence from a list made beforehand so i can just get a random sentence by doing a simple putting “$random” in the code will call it.
@andre4s_yDec 09.2007 — #Maybe just put the sentence in the array, then pick the array with rand function, save it in the $random variable, and then echo-ing it.
Something like this : [code=php] <?php $sentence[] = "Good Morning"; $sentence[] = "Good Afternoon"; $sentence[] = "Good Evening"; $random = $sentence[rand(0,count($sentence)-1)]; echo $random; ?> [/code] Hope that help you...