1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Array problem

Discussion in 'PHP' started by Lukaslo, Feb 26, 2007.

  1. #1
    Ok I have an array with folowing values
    $x=array(a=>34,b=>32,c=>31,d=>29,e=>28,f=>24,g=>21...,z=>1)
    so a descending values in an array

    now I would like to make this array shorter like:
    $x=array(a=>34,b=>32,c=>31)
    (only first 3 values)

    and than randomize it:
    $x=array(c=>31,a=>34,b=>32) or something like that (random...)

    How can I do this ?
     
    Lukaslo, Feb 26, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
  3. Lukaslo

    Lukaslo Peon

    Messages:
    751
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you :)
     
    Lukaslo, Feb 26, 2007 IP