Jump to content

rustyofco

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by rustyofco

  1. My array goes like this:
    [code]$array[1][a] = 8253EF
    $array[1][b] = joe

    $array[2][a] = 2016HG
    $array[2][b] = bob

    $array[3][a] = 5768NT
    $array[3][b] = adam[/code]

    I want to sort it so that the item in the [a] key goes ascending alphabetically (alphanumerically), but it stays with its associated name (the b key).

    So in the end, I want

    [code]$array[1][a] = 2016HG
    $array[1][b] = bob

    $array[2][a] = 5768NT
    $array[2][b] = adam

    $array[3][a] = 8253EF
    $array[3][b] = joe[/code]

    What function is this?
  2. 1. I have an array, lets say 2,4,6,8
    Next, I have a number x (just some random number between 1-10)

    Whenever x matches any of the elements of the array, I want it to echo MATCH (for example)

    BTW, the variable x changes because it is in a while loop.

  3. 1. how do I say "if this thing is equal to ANY OF THESE OTHER THINGS"

    And these other things are dynamic, and there can be a different quantity of these other things.

    2. Can you put a while funtion inside another while function? I tried it and it didn't seem to work... How can it work?
×
×
  • 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.