Hello all,
I have this array:
p[0]=0 p[1]=0 p[2]=1 p[3]=0 p[4]=1 p[5]=0 p[6]=0 p[7]=1
I need to get a random selection only from the vars that equal 0.
How can I fo it?
Thanks, Assaf
Bad solution:
do { $i = rand(0, 7); } while ( $p[$i] );
waw
i c it a nice solution 😉
No. It's a bad solution.
As u want my friend
it is really a very bad one r u happy now 😃
I will be grateful if u know mysql and to give me as this bad answer to my problem here
http://www.phpbuilder.com/board/showthread.php?threadid=10261368&goto=newpost
Thanks, It works.
Why it is a bad soultion?