Jump to content

cromulent

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by cromulent

  1. That is what I was looking for. Thanks.
  2. I probably did not do a very good job of explaining what I wanted but I think I came up with a solution using array_multisort: $arr = array('a','quick','brown','fox','jumped','over','the','lazy','dog'); $numbers = range(1, sizeof($arr)); $myseed = 20; //generated from the results of a users questions srand($myseed); shuffle($numbers); array_multisort($numbers, $arr); foreach ($arr as $value) { echo "Value: $value<br />\n"; } At this point I will just need a subset of the result array.
  3. The results of my custom_array_rand will be based off answers a user gives(the seed) to a set of questions. If they answer the questions the same I want the results to be the same although I don't want to go through myself and assign the results for each possible set of answers.
  4. I would like to know how I can create a customized array_rand so I can give it a seed and generate expected results based on the number seeded. Any thoughts on how to do this?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.