Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Array Sorting

    Hey everyone,

    I figured someone out there must have come across the need for this before, so
    rather than continue banging my head against the wall, I turn to the community.

    Basically, I have an array of structs. Within each array element, is a struct
    key that contains a numeric value. This array is built in a relatively random
    order. Once I have the completed array, I need to be able to rebuild the array
    sorted, either ASC or DESC, by this one struct key.

    So in essence, I need to be able to restructure an array based on sorting of
    myArray[x].myStructKey

    I've tried duplicating the concept of a C/C++ Bubble Sort, but for some reason
    I end up having to refresh a couple times before the array is sorted correctly.

    Anyone have a function like this that already exists?

    Thanks so much in advance,

    DCS Admin Guest

  2. Similar Questions and Discussions

    1. Sorting array vs sorting paginated array
      ....pulling in a long list of photos in a gallery, and I have a sort function working within the pages of data fine. I need to bring it back out of...
    2. Sorting an Array containing a structure...
      I a loop nested in a loop that drives a query that kind of walks backwards out by a commodity classification then by region classification... so...
    3. Advance Sorting Array
      Hello How would one go about sorting a (Jagged Array??). Here is my code of the array that is getting populated with all users in active...
    4. [PHP] Array Sorting, 2 items...
      > -----Original Message----- Well, erm, maybe I've got the wrong glasses on today, or maybe you've made a cut'n'paste boo-boo, but it sure looks...
    5. Sorting a Multidimensional Array
      I have an array like this: $events = array( array( '2003-07-01', 'Event Title 1', '1' //ID Number (not unique) ), array( '2003-07-02',
  3. #2

    Default Re: Array Sorting

    No one has a solution to this? :-/
    DCS Admin Guest

  4. #3

    Default Re: Array Sorting

    I think you might find something useful here: [url]http://www.cflib.org/udf.cfm?ID=359[/url]

    pukkel Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139