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

What is an example of a variable?

0 Answers  


What is singleton design pattern in php?

0 Answers  


Write a php function to convert all null values to blank?

0 Answers  


can we use PGP with PHP?

1 Answers  


How can we submit form without a submit button?

0 Answers  


What is difference between ksort() and usort() functions.

0 Answers  


What is the role of php.ini file?

0 Answers  


What is the use of rand() in php?

0 Answers  


What is difference between readonly and constant?

0 Answers  


Tell me how can we pass the variable through the navigation between the pages?

0 Answers  


How to create an array from php string?

0 Answers  


What is mean by an associative array?

0 Answers  


Categories