jstfsklh211 79 Light Poster

Some browsers will resort a json array by index to make access faster, I understand this.

The problem is that when I pass my json object to jeditable using the data setting, in those browsers my options dont come out in the order I need them (Alphabetic).

PHP creating the array

foreach($arrStations as $arrStation){
     $arrJSONStations[(string)$arrStation['station_id']]=$arrStation['station_name'];
}

JS/PHP dumping array into jeditable

$('.typeStation').editable('editable_ajax.php', {
    submitdata : {target_table: "<?php print ip_address?>", action_taken:"update", key_column_name:"<?php print ipID?>", related_table:"station", related_column_name:"station_name"},
    indicator : 'Saving...',
    tooltip   : 'Click to edit...',
    data   : "<?php print addslashes(json_encode($arrJSONStations))?>",
    type   : 'select',
    submit : 'OK'
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.