Re: [PHP] random string

This is a discussion on Re: [PHP] random string within the PHP General forums, part of the PHP Programming Forums category; On 10/17/06, Ross <ross@aztechost.com> wrote: > > > Hi, > > I want to ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2006
Brice
 
Posts: n/a
Default Re: [PHP] random string

On 10/17/06, Ross <ross@aztechost.com> wrote:
>
>
> Hi,
>
> I want to randomise a string
>
> $myrandom = rand("ross", "andrea");



I suggest :
$array_name = array("rose","andrea");
$myrandom = array_rand($array_name);
echo $myrandom[0];

Brice.

I know this doesn't work but is there a built in function to do this?
>
>
> R.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:15 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0