Hi
I can't get the following to work:
[code=php]
//that is in the for loop only it works just an example of the array
$users[$i] = array( 'username' => $unique[$i], 'times' => $k );
}
$users[3] = array( 'username' => "testuser", 'times' => 8000 ); //add use
echo $users[0]['times'];
for ($l=0;$l<sizeof ($users);$l++)
for ($k=0;$k<sizeof ($users);$k++)
{
echo $users[$k+1]('username''tim es);
if ($users[$k]['times'] < $users[$k+1]['times'])
{
$temp[0]['username']['times']= $users[$k]['username']['times'];
$users[$k]['username']['times']=$users[$k+1]['username']['times'];
$users[$k+1]['username']['times']=$temp[0]['username']['times'];
}
}
[/code]
Any idea why the array doesnt get sorted :-( ??
Thanks
Panos
I can't get the following to work:
[code=php]
//that is in the for loop only it works just an example of the array
$users[$i] = array( 'username' => $unique[$i], 'times' => $k );
}
$users[3] = array( 'username' => "testuser", 'times' => 8000 ); //add use
echo $users[0]['times'];
for ($l=0;$l<sizeof ($users);$l++)
for ($k=0;$k<sizeof ($users);$k++)
{
echo $users[$k+1]('username''tim es);
if ($users[$k]['times'] < $users[$k+1]['times'])
{
$temp[0]['username']['times']= $users[$k]['username']['times'];
$users[$k]['username']['times']=$users[$k+1]['username']['times'];
$users[$k+1]['username']['times']=$temp[0]['username']['times'];
}
}
[/code]
Any idea why the array doesnt get sorted :-( ??
Thanks
Panos
Comment