<p>here is the input  i am getting from my flash file </p>

<p>process.php?Q2=898&amp;Aa=Grade1&amp;Tim=0%3A0%3A12&amp;Q1=908&amp;Bb=lkj&amp;Q4=jhj&amp;Q3=08&amp;Cc=North%20America&amp;Q0=1</p>

<p>and in php i use this code
foreach ($_GET as $field => $label)
{
    $datarray[]=$_GET[$field];</p>

<pre><code>echo  "$field :";
echo $_GET[$field];;
echo "&lt;br&gt;";
</code></pre>

<p>i get this out put</p>

<p>Q2 :898
Aa :Grade1
Tim :0:0:12
Q1 :908
Bb :lkj
Q4 :jhj
Q3 :08
Cc :North America
Q0 :1</p>

<p>now my question is how do i sort it alphabaticaly so it should look like this 
Aa :Grade1
Bb :lkj
Cc :North America
Q0 :1
Q1 :908</p>

<p>and so on....before i can insert it into the DB</p>

```
```
ksort($_GET);
```
```
This should
ksort
the
```
$_GET
```
array by it's keys.
krsort
for reverse order.