One more thing on my array problem.

From: Date: Mon, 05 Jun 2000 02:31:16 +0000
Subject: One more thing on my array problem.
Groups: php.general 
Request: Send a blank email to php-general+get-1011@lists.php.net to get a copy of this message
My old array looks like this: $alpha_array[61][1]; $alpha_array[0][0]="a"; $alpha_array[0][1]="b"; $alpha_array[0][2]="c"; $alpha_array[0][3]="d"; $alpha_array[0][4]="e"; $alpha_array[0][5]="f"; $alpha_array[0][6]="g"; $alpha_array[0][7]="h"; .... and so on with the end like this: echo $alpha_array[0][rand(1,61)]; ... and 8 more times. But I would rather switch to an array like this: $alpha = array ( "letters" => array(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z), "numbers" => array(1,2,3,4,5,6,7,8,9,0) ); can someone help me with a random function for this? Thanks! -------------------------------------------- -Alex "Big Al" Behrens E-mail: bigal@3d-unlimited.com Phone: 651-482-8779 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: news@3d-unlimited.com

« previous php.general (#1011) next »