Jump to content

Tidehunter

New Members
  • Posts

    3
  • Joined

  • Last visited

Tidehunter's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Actually I did. My question was, is there another way to use a number range using arrays. You're telling me how switches work, yet you don't provide an example. You're telling me to provide actual code to look when I don't even know how to code it? rofl I wasn't looking forward to having an ass enter my thread, otherwise I'd just fart. Thanks for your god damn help.
  2. Oh, well... apologies. It was a quick example not meant to be correct. Thank you anyways.
  3. I have a switch that uses a rand() to find the respective cases in between a number range, like so: switch($number = rand(1,10)) { case ($number > 1 && $number <= 5): doFunction(); break; case ($number > 5): doFunction(); break; } how would I use this in an array format? I find using switches to be clunky and limiting. I want to be able to do like: $array = array( 1-10 => 'value', 11-20 => 'value' ) Is this possible?
×
×
  • 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.