Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Need to use mt_rand on a array lol

$
0
0

Okay, so my monsters table has a column called "droparray" for example: 7,2,5

 

7,2,5 are the id's of the items they could POSSIBLE get when they kill the monster :)  [Intuitive eh?]

 

I need a way to just select a random number from those 3 numbers (or any amount) AND a way to let's say if 7 was a unique item, have it a less % chance.

 

Any ideas? :)


Viewing all articles
Browse latest Browse all 13200

Trending Articles