- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
mt_srand() function in PHP
The mt_srand() function seeds the Mersenne Twister random number generator.
Note − Random number generator is seeded automatically after the release of PHP 4.2.0. This function is not needed now.
Syntax
mt_srand(seed)
Parameters
seed − The seed value
Return
The mt_srand() function Returns nothing.
Example
<?php mt_srand(mktime()); echo(mt_rand()); ?>
Output
1320295657
Advertisements