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

Differentiate between require and include?

0 Answers  


How can we know the total number of elements of Array?

0 Answers  


What is the use of isset() in php?

0 Answers  


What is Joomla?

5 Answers   T3 Softwares, Zend,


What is php dependency injection?

0 Answers  






How would you open a directory for reading in php?

0 Answers  


How to find the length of a string?

0 Answers  


What is a string in php?

0 Answers  


How to download the files using PHP

1 Answers  


What are php libraries?

0 Answers  


How to restrict the number of users login ? For ex:- if the allowed login is 10, for 11th user, the application should restrict them from login.

1 Answers  


What is the use of callback in php?

0 Answers  


Categories