what method is used to generate a random number?

Answers were Sorted based on User's Feedback



what method is used to generate a random number?..

Answer / lakhan lal

use rand() or mt_rand()

example:rand() or rand(20,30);

Is This Answer Correct ?    7 Yes 1 No

what method is used to generate a random number?..

Answer / mahidhar

using rand() function we generate the random numbers.

example : $num="12345678";
$result=rand($num);

the $result gives the random numbers.

Is This Answer Correct ?    7 Yes 4 No

what method is used to generate a random number?..

Answer / senthilkumar g

using srand();
it will generate the randam numbers

Is This Answer Correct ?    3 Yes 0 No

what method is used to generate a random number?..

Answer / sunil kumar

<?php
echo(4,900);//depend upon ur choice
?>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Why php is sometimes called as embedded scripting language?

0 Answers  


Tell me what does the array operator '===' means?

0 Answers  


Can I learn laravel without php?

0 Answers  


What is substr in php?

0 Answers  


What is csrf mvc?

0 Answers  






Who developed php?

0 Answers  


•How can we submit a form without a submit button

5 Answers  


List the different types of print functions available in php?

0 Answers  


Explain me what is x+ mode in fopen() used for?

0 Answers  


Is it possible to get the screen resolution and like with php?

1 Answers  


Do you know how to declare an array in php?

0 Answers  


How to do single and multi line comment in php?

0 Answers  


Categories