title: jQuery Sortable, save changed order of list items into database
body: <p>I need to save NOT the id's (actually I have no id's in my li-tags) but the values of the list in a database.</p>
  
  <p>I think I need the methods serialize or toArray. I would prefer toArray because I don't really need to send my data to an other location via ajax etc.</p>
  
  <p>It would be perfect to get an array of the list item values like this:</p>
  
  <pre><code>array array( 
    [0] = "value-1", 
    [1] = "value-2", 
    [2] = "value-3" 
  )
  </code></pre>
  
  <p>How can I reach that?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function() { 
   $( "#sortable" ).sortable({
    update: function( event, ui ) {
            //don't know how to continue correctly
    }
   }).disableSelection();
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul id="sortable"&gt;
     &lt;li&gt;value-1&lt;/li&gt;
     &lt;li&gt;value-2&lt;/li&gt;
     &lt;li&gt;value-3&lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>