views:

16

answers:

1

Dear all, I have asked a question about random generating -ve +ve decimal value here:

http://stackoverflow.com/questions/3206563/how-to-generate-random-ve-ve-decimal-with-php

But now i have another more challenging problem. May I know how can I generate random integer with -ve +value with a different set? like from -552 to 2200 as an example? Thank you.

+1  A: 

Have you tried $rand = rand(-552, 2200); ?

Mark Baker
i thought the minimum for rand() is 0. haha. thanks mark.. wt..
benmsia