Sorting Array [0] <pre><code>Array ( [0] =&gt; wilson ) Array ( [0] =&gt; umkk ) Array ( [0] =&gt; audiok ) Array ( [0] =&gt; Futurama ) </code></pre> <p>I have the above users array, i'm trying to sort it alphabetically so the result looks like this</p> <pre><code>audiok futurama umkk wilson </code></pre> <p>This is my php code from those lines:</p> <pre><code>$arr1 = explode("\n", $users); sort ($arr1); print_r($arr1); </code></pre> <p>Why isn't sort () working? It doesnt sort it at all.. what am i doing wrong? I'm new to php programming, i have looked on the php manual and have not been able to sort it after trying all these different examples posted there.</p> <p>Thanks in advanced.</p> <p>Edit:</p> <pre><code>preg_match_all('/control\?user=(.+?)&amp;data/', $linklong, $users) $users = $users[1][0];} </code></pre> <p>if i print $users all the users are displayed nicely, but when i tried to sort them it tells me is not array, so i took $users, and did explode to create the array... i'm sorry im not very programming savy –</p>