You could use the given number as a seed and generate the number using the standard random number function.
function getrand($num)
{
srand($num);
return rand(1 , 30);
}
More Related Contents:
- Count array by parse value of array
- i need a PHP code to find longest contiguous sequence of characters in the string
- Auto Increment ID’s of 4 digit
- An algorithm for Random Number Pair Generation [closed]
- Finding cartesian product with PHP associative arrays
- How to implement authorization using a Telegram API?
- List of Big-O for PHP functions
- Finding n-th permutation without computing others
- How to generate all permutations of a string in PHP?
- Achieve hierarchy, Parent/Child Relationship in an effective and easy way
- PHP algorithm to generate all combinations of a specific size from a single set
- Preserve key order (stable sort) when sorting with PHP’s uasort
- String with array structure to Array [duplicate]
- Group array by subarray values
- Is there any way to detect strings like putjbtghguhjjjanika?
- Generating random numbers without repeats
- Combinations, Dispositions and Permutations in PHP
- algorithm that will take numbers or words and find all possible combinations
- Calculating distance between zip codes in PHP
- Algorithm to get all possible string combinations from array up to certain length
- Algorithm for generating a random number
- PHP take all combinations
- Grouping arrays in PHP
- Algorithm to get the excel-like column name of a number
- recursive function to get all the child categories
- finding common prefix of array of strings
- What kinds of patterns could I enforce on the code to make it easier to translate to another programming language? [closed]
- Using str_replace so that it only acts on the first match?
- php get values from json encode
- How to exclude certains columns while using eloquent