coding question...
Posted: Mon Jul 25, 2005 7:45 pm
I would have put a better subject but i wasnt sure what to call it.
Im trying to do something thats probably simple but im rather new to php and figured id ask since i dont know anyone to talk to that knows php.
ive basicly want something to be executed by a random success rate which you can choose yourself depending on a value.
if i have this,
id have what i wanted to be executed 50% of the time for star 1 and 60% for star 2 which would be random.
so if u say had star 1, you would click on something and it would bring up that you did it (with success info) or you didnt (with fail info)
i hope that makes sence, if anyone can help me out it would be great.
hmm.. i think i confused myself
Im trying to do something thats probably simple but im rather new to php and figured id ask since i dont know anyone to talk to that knows php.
ive basicly want something to be executed by a random success rate which you can choose yourself depending on a value.
if i have this,
Code: Select all
if($star == 1){ $success = .5; }
if($star == 2){ $success = .6; }so if u say had star 1, you would click on something and it would bring up that you did it (with success info) or you didnt (with fail info)
i hope that makes sence, if anyone can help me out it would be great.
hmm.. i think i confused myself