Hello!
I'm having a little trouble with the sprintf() function. What I'm trying to do is create a random number with the rand() function and then turn it into a non-fractional integer (ie 2 instead of 2.5 or whatever). The problem is that I don't quite understand the syntax for the sprintf function. Should my statement be like this:
$random = sprintf(%2c, $random);
Please let me know asap.
Thanks!
Jisoo22
I'm having a little trouble with the sprintf() function. What I'm trying to do is create a random number with the rand() function and then turn it into a non-fractional integer (ie 2 instead of 2.5 or whatever). The problem is that I don't quite understand the syntax for the sprintf function. Should my statement be like this:
$random = sprintf(%2c, $random);
Please let me know asap.
Thanks!
Jisoo22