Toxicterror's Profile
Reputation: 15
Tradesman
- Group:
- Active Members
- Active Posts:
- 685 (0.45 per day)
- Joined:
- 10-March 09
- Profile Views:
- 4,984
- Last Active:
Sep 04 2012 08:13 AM- Currently:
- Offline
Previous Fields
- Country:
- CH
- OS Preference:
- Windows
- Favorite Browser:
- Chrome
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Latest Visitors
-
JMRKER 
20 Jul 2012 - 07:22 -
chuckjessup 
18 May 2011 - 01:33 -
Vip3rousmango 
23 Apr 2011 - 18:54 -
sarmanu 
11 Feb 2010 - 07:07
Posts I've Made
-
In Topic: dont understand array_multisort
Posted 4 Sep 2012
didnt know that
just solved the problem a minute ago
while ($ds = mysql_fetch_object($rs)) { $userlist[] = array( $ds->user, $ds->coord, $ds->points, $ds->score, $ds->old_score-$ds->score, $ds->points-$ds->old_points, ($ds->points*100)/$ds->old_points-100 ); } function srt($a,$B)/> { return strnatcmp($a[6], $b[6]); } usort($userlist, 'srt'); $userlist = array_reverse($userlist);
this outputs a list which is sorted by the last entry (index 6) -
In Topic: dont understand array_multisort
Posted 4 Sep 2012
thanks alot... this last post was very helpful
didnt have much time the last few weeks but i finally can solve this bug.
how do you mean, you can accomplish this within a sql query?
got the data like this now....
while ($ds = mysql_fetch_object($rs)) { $userlist[] = array( $ds->user, $ds->coord, $ds->points, $ds->score, $ds->old_score-$ds->score, $ds->points-$ds->old_points, ($ds->points*100)/$ds->old_points-100 ); }
how do i sort the array of arrays by the last value? -
In Topic: dont understand array_multisort
Posted 21 Aug 2012
Quote
Warning: Division by zero in C:\xampp\htdocs\tmp\userlist.php on line 97
Warning: array_multisort() [function.array-multisort]: Array sizes are inconsistent in C:\xampp\htdocs\tmp\userlist.php on line 100
Warning: number_format() expects parameter 1 to be double, string given in C:\xampp\htdocs\tmp\userlist.php on line 103
Warning: number_format() expects parameter 1 to be double, string given in C:\xampp\htdocs\tmp\userlist.php on line 104
Warning: number_format() expects parameter 1 to be double, string given in C:\xampp\htdocs\tmp\userlist.php on line 104
And there are complete wrong values in the output.
As I said, I saw the code on php.net. I've got no clue what or how the multisort works...
http://php.net/manua...y-multisort.php -
In Topic: string.replace() problems
Posted 20 Jul 2012
as for now on i'll just assign everything to a "new" variable
-
In Topic: string.replace() problems
Posted 20 Jul 2012
hmm why does JS just dont sound logic to me...
sometimes it need to assign it to a variable, sometimes it doesnt
i'll give it a try and hope it'll work
My Information
- Member Title:
- blub
- Age:
- 21 years old
- Birthday:
- June 4, 1991
- Gender:
-
- Location:
- Switzerland
- Years Programming:
- 2
- Programming Languages:
- Java, C, VB6, PHP, JSP, HTML&CSS
Contact Information
- E-mail:
- Private
- Website URL:
-
http://www.virtualeffect.ch
Friends
Toxicterror hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
Vip3rousmango
23 Apr 2011 - 18:54