Random text

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

uncertain_manos
New php-forum User
New php-forum User
Posts: 31
Joined: Wed Oct 23, 2002 12:55 am

Re: Random text

Postby uncertain_manos » Wed Dec 18, 2002 11:24 pm

c2i wrote:Hi

I'm looking for a function of some sort that can randomize a text

Lets say i have the text "Hello World"

After running the function i want it to show:
"fdsik dfsal" or "fds8d bx01s" <-- random

Anyone know how this can be done?


hi there,
what do you mean by "ramdomize"? Do you mean to randomly put the letters of the current phrase into a random position, or do you mean to randomly replace the current letters by other letters? And if so then do you need your program to remember which letter was replaced by which letter?

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Thu Dec 19, 2002 2:13 am

http://www.php.net/manual/en/function.rand.php

look at comments from clev at cleverone dot com


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest

cron