User Defined Ordering List with multi Demi Array
<p>I have always been a lurker here, but It's time to actually post my question, I am in no way a PHP EXPERT like some of you guys here, but I can learn and adapt to what you tell me very easily.  I Am pretty much stumped at the moment here is my code:</p>

<pre><code>$middle=array ( 1  =&gt; array ( "section" =&gt; $notes,
                            "hide" =&gt; $display['1'],
                             "left" =&gt; "0",
                             "right" =&gt; "0",
                             "middle" =&gt; "1",
                                 ),
              2 =&gt; array ("section" =&gt; $signature,
                            "hide" =&gt; $display['2'],
                              "left" =&gt; "0",
                             "right" =&gt; "0",
                             "middle" =&gt; "1"
                                 ),




              3   =&gt; array ("section" =&gt; $friends,
                              "hide" =&gt; $display['4'],
                               "left" =&gt; "0",
                             "right" =&gt; "0",
                             "middle" =&gt; "1"
                                 ),
            );
$order = array(1,2,3);
foreach ($order as $index =&gt; $lol)
{
if ($middle[$lol]['hide'] != 1){
if ($middle[$lol]['left'] == 1){
$lside .= $middle[$lol]['section'];
}
if ($middle[$lol]['right'] == 1){
$rside .= $middle[$lol]['section'];
}
if ($middle[$lol]['middle'] == 1){
$mside .= $middle[$lol]['section'];
}
        }
}
</code></pre>

<p>I dont think my Code is showing up correctly, you can view it here:
<a href="http://pastebin.com/7uFL2iud" rel="nofollow">http://pastebin.com/7uFL2iud</a></p>

<p>My issue is with 
"$order = array(1,2,3);"</p>

<p>This essentially orders my $middle variable, each 'section' => $notes,$signature,$friends are a variable called to show the user's info for each variable. $notes will show the person's biography and so on. The $lside,$rside,$middle is my echoing out features to show them on the "left" or right, or middle parts of the persons profile. </p>

<p>My Problem is, how can I store the data to let the user change between the "1,2,3" to any order they want? So they can order there section 2,1,3 or (any combination).  There is no validation method to check to make sure the user has not inputted the number twice or whatnot? I have no idea how to validate it.  It will be used in a simple exploded row though, "1,2,3".</p>

<p>Example, what if users pressed a button to move the Notes section down one spot? That would moving the 1 and the 2.  How would I replace the 1 and the 2 in the 1,2,3 so it's like 2,1,3.  and so on for each combination? Really confusing for me.</p>

<p>If you can help, it be wonderful, this is my First post here. Thank you </p>
