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

How can cross site request forgery csrf be prevented?

0 Answers  


What is mvc in php?

0 Answers  


what are the differents between 'action' and 'target' in form tag?

3 Answers  


Who is known as the father of php?

0 Answers  


how to upload more than 50 mb? i tried but session was expired....certain time .....i was set session duration three days .... how to rectified? if any one know that post ur answer as soon as possible?already i was increase php.ini but not working......

2 Answers  






Name some of the popular frameworks in php.

0 Answers  


What is regular expression in javascript?

0 Answers  


What is difference between session and cookie in PHP?

0 Answers  


What are sql functions?

0 Answers  


Tell me how do I check if a given variable is empty?

0 Answers  


Do I need apache for php?

0 Answers  


I finished my degree 4 years back. I didnt get job in software. In the time(for 4 years) i worked one kpo industries. but now i got job in php(40 employes working there) as fresher(Salary 8000). Shall i join in php. I have no knowledge about php. Can i do well in php. How will my carrier if i join in php? Please can you give your idea.? It will be more usefull to me.

2 Answers  


Categories